Skip to content

Commit 462c359

Browse files
Paul Mulliganclaude
andcommitted
ci: drop registry-url so npm uses OIDC trusted publishing
actions/setup-node with registry-url writes an .npmrc containing a placeholder _authToken (XXXXX-XXXXX-XXXXX-XXXXX). npm sees a configured token and attempts token auth with that garbage value instead of performing the OIDC trusted-publishing exchange, producing a 404 on publish. Removing registry-url leaves no auth token configured, so npm falls through to OIDC. The default registry is already registry.npmjs.org. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent a1fa56d commit 462c359

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/publish-npm.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,13 @@ 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.
5357
- uses: actions/setup-node@v4
5458
with:
5559
node-version: 20
56-
registry-url: https://registry.npmjs.org
5760
cache: pnpm
5861
cache-dependency-path: ${{ inputs.package }}/pnpm-lock.yaml
5962

0 commit comments

Comments
 (0)