Skip to content

Commit 841b03f

Browse files
Habiruaclaude
andcommitted
ci: drop registry-url from setup-node so OIDC handles auth
setup-node@v4 with registry-url writes a legacy .npmrc with always-auth=true which prevents npm 11.x from attempting OIDC token exchange. Without registry-url, npm falls through to OIDC trusted publisher properly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0259393 commit 841b03f

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

.github/workflows/publish.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ jobs:
2222
- uses: actions/setup-node@v4
2323
with:
2424
node-version: '20'
25-
registry-url: 'https://registry.npmjs.org'
2625
cache: 'npm'
2726

2827
- name: Upgrade npm (OIDC trusted publisher requires npm 11.5.1+)
2928
run: |
3029
npm install -g npm@latest
31-
which npm
3230
npm --version
33-
node --version
31+
32+
- name: Configure npm registry (no auth — OIDC will handle it)
33+
run: npm config set registry https://registry.npmjs.org/
3434

3535
- run: npm ci
3636

@@ -43,8 +43,4 @@ jobs:
4343
run: npm version ${{ github.event.inputs.version }} --no-git-tag-version
4444

4545
- name: Publish to npm (OIDC)
46-
run: |
47-
npm --version
48-
npm publish --provenance --access public
49-
env:
50-
NODE_AUTH_TOKEN: ''
46+
run: npm publish --provenance --access public

0 commit comments

Comments
 (0)