Skip to content

Commit 0d7635d

Browse files
tkirda-bisonclaude
andcommitted
ci(release): use node 24 and drop registry-url for OIDC publish
First v2.0.0 publish attempt 404'd. Two stacked issues: 1. actions/setup-node@v6 with registry-url: writes an .npmrc containing `//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}`. We never set NODE_AUTH_TOKEN, so npm sees the literal `XXXXX-XXXXX-XXXXX-XXXXX` placeholder as the auth token. That bogus credential overrides the OIDC flow and npm replies 404 (its stock response for failed auth on an existing package). 2. Node 20 ships npm 10.x; Trusted Publisher OIDC publish support landed in npm 11.5.1. Even with the .npmrc fix, Node 20's npm would not have used the OIDC token. Bump release runner to Node 24 (npm 11.x native) and drop registry-url so npm uses the native OIDC auth path. The CI workflow stays on Node 20 to keep verifying our package.json engines.node minimum. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent cab0daf commit 0d7635d

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,16 @@ jobs:
2929

3030
- uses: actions/setup-node@v6
3131
with:
32-
node-version: 20
32+
# Node 24 ships npm 11.x natively, which has Trusted Publisher
33+
# OIDC publish support (landed in npm 11.5.1). Node 20 ships
34+
# npm 10.x and would need a separate `npm install -g npm@latest`.
35+
# The CI workflow stays on Node 20 to verify package.json
36+
# engines.node minimum — but for releasing we want the modern CLI.
37+
node-version: 24
3338
cache: npm
34-
registry-url: https://registry.npmjs.org
39+
# Deliberately no `registry-url:` — that flag makes setup-node
40+
# write an .npmrc with `_authToken=${NODE_AUTH_TOKEN}` which
41+
# overrides OIDC. We want npm to use the native OIDC auth flow.
3542

3643
- run: npm ci
3744

0 commit comments

Comments
 (0)