Skip to content

Commit

Permalink
set npm token manually in npmrc
Browse files Browse the repository at this point in the history
  • Loading branch information
nsaunders committed May 26, 2024
1 parent f86a763 commit 8eae6fa
Showing 1 changed file with 12 additions and 22 deletions.
34 changes: 12 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v3
with:
version: 9.0.4
run_install: false

- uses: actions/checkout@v4
with:
fetch-depth: 0
Expand All @@ -22,35 +27,20 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
registry-url: "https://registry.npmjs.org"
cache: "pnpm"

- name: nvmrc cleanup
run: rm .nvmrc

- uses: pnpm/action-setup@v3
with:
version: 9.0.4
run_install: false

- name: get pnpm store
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: pnpm cache
env:
STORE_PATH: ${{ env.STORE_PATH }}
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- run: pnpm install
- run: pnpm install --frozen-lockfile

- run: pnpm check

- if: github.ref == 'refs/heads/master'
run:
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >>
~/.npmrc

- if: github.ref == 'refs/heads/master'
name: publish
id: changesets
Expand Down

0 comments on commit 8eae6fa

Please sign in to comment.