Skip to content

Commit 97152b8

Browse files
committed
fix: use NODE_AUTH_TOKEN for npm publish auth
setup-node with registry-url creates .npmrc that reads NODE_AUTH_TOKEN. Drop manual .npmrc writing and npm@latest update. OIDC provenance for scoped packages has open bugs with changesets, so we use the NPM_TOKEN directly via NODE_AUTH_TOKEN.
1 parent 9fee8e2 commit 97152b8

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,10 @@ jobs:
4747
node-version: lts/*
4848
registry-url: https://registry.npmjs.org
4949

50-
- name: Update npm for trusted publishing (OIDC)
51-
run: npm install -g npm@latest
52-
5350
- run: bun install --frozen-lockfile
5451

5552
- run: bun run build
5653

57-
- name: Authenticate with npm
58-
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
59-
6054
- name: Create Release Pull Request or Publish to npm
6155
id: changesets
6256
uses: changesets/action@c48e67d110a68bc90ccf1098e9646092baacaa87 # v1.6.0
@@ -66,4 +60,5 @@ jobs:
6660
setupGitUser: false
6761
env:
6862
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
63+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6964
NPM_CONFIG_PROVENANCE: true

0 commit comments

Comments
 (0)