Skip to content

Commit 2cebdac

Browse files
Paul Mulliganclaude
andcommitted
ci: restore registry-url; required for OIDC trusted publishing
Reverts the registry-url removal. The npm docs confirm registry-url is required for trusted publishing: it points npm at the registry to mint the OIDC token against. Without it npm performs no OIDC exchange and fails with ENEEDAUTH. The placeholder _authToken setup-node writes is ignored by npm in favour of OIDC whenever a matching trusted publisher exists for the package. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 462c359 commit 2cebdac

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/publish-npm.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,14 @@ jobs:
5050
with:
5151
version: 9
5252

53-
# No registry-url: passing it makes setup-node write an .npmrc with a
54-
# placeholder _authToken, and npm then does (failing) token auth instead
55-
# of the OIDC trusted-publishing exchange. The default registry is already
56-
# registry.npmjs.org, which is also where provenance must be published.
53+
# registry-url is required for OIDC trusted publishing: it points npm at
54+
# the registry to mint the short-lived token against. setup-node also
55+
# writes a placeholder _authToken, which npm ignores in favour of OIDC as
56+
# long as a matching trusted publisher is configured for this package.
5757
- uses: actions/setup-node@v4
5858
with:
5959
node-version: 20
60+
registry-url: https://registry.npmjs.org
6061
cache: pnpm
6162
cache-dependency-path: ${{ inputs.package }}/pnpm-lock.yaml
6263

0 commit comments

Comments
 (0)