Skip to content

Commit bf35dcd

Browse files
committed
fix(ci): drop registry-url so pnpm runs the OIDC exchange
setup-node's registry-url writes an _authToken=${NODE_AUTH_TOKEN} line to .npmrc. With no token set, pnpm reads the empty value as configured auth and never starts the trusted-publishing token exchange, so the publish goes out anonymous and npm masks the auth failure as E404. npm 11 tolerated the empty line and did OIDC anyway, which is why publishing worked before 8c204d6 moved the upload to pnpm 10. See actions/setup-node#1551.
1 parent 48f6eb7 commit bf35dcd

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎.github/workflows/release.yml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,21 @@ jobs:
2222
- name: Setup pnpm
2323
uses: pnpm/action-setup@v4
2424

25+
# No registry-url here: setup-node would write an
26+
# _authToken=${NODE_AUTH_TOKEN} line to .npmrc, and with no token set
27+
# pnpm treats the empty value as configured auth and skips the OIDC
28+
# exchange, publishing anonymously (E404).
29+
# See https://github.com/actions/setup-node/issues/1551
2530
- name: Setup Node.js
2631
uses: actions/setup-node@v4
2732
with:
2833
node-version-file: .nvmrc
2934
cache: pnpm
30-
registry-url: 'https://registry.npmjs.org'
3135

3236
# pnpm >= 10 supports npm OIDC trusted publishing natively, so no global
3337
# npm upgrade is needed — pnpm publishes without delegating to npm.
38+
# Stay on pnpm 10.x: OIDC publish regressed in pnpm 11
39+
# (https://github.com/pnpm/pnpm/issues/11513).
3440

3541
- name: Install dependencies
3642
run: pnpm install --frozen-lockfile

0 commit comments

Comments
 (0)