Skip to content

ci: fix OIDC publish auth (drop registry-url placeholder token) - #5

Merged
planadecu merged 1 commit into
mainfrom
fix/oidc-publish-auth
Jul 13, 2026
Merged

ci: fix OIDC publish auth (drop registry-url placeholder token)#5
planadecu merged 1 commit into
mainfrom
fix/oidc-publish-auth

Conversation

@planadecu

Copy link
Copy Markdown
Owner

Follow-up to #4 — the OIDC publish still failed with E404.

Root cause: actions/setup-node with registry-url writes an .npmrc containing _authToken=${NODE_AUTH_TOKEN} and defaults NODE_AUTH_TOKEN to a placeholder (XXXXX-XXXXX-XXXXX-XXXXX). The publisher used that fake token instead of the OIDC exchange → 404. Provenance signing worked (it uses the id-token directly), which masked the auth problem.

Fix:

  • Remove registry-url from setup-node so no placeholder auth token shadows OIDC.
  • Upgrade to npm@latest (OIDC trusted publishing needs npm ≥ 11.5.1).
  • Publish with npm publish (the reference OIDC path) instead of pnpm publish.

Trusted Publisher config is unchanged (same repo + publish.yml). Merging triggers the workflow, which should publish the next patch version via OIDC.

The previous OIDC attempt still 404'd because actions/setup-node with
registry-url writes an .npmrc with _authToken=${NODE_AUTH_TOKEN} and a
placeholder token, which the publisher used instead of doing the OIDC
exchange. Remove registry-url so nothing shadows OIDC, upgrade to
npm >= 11.5.1 (required for trusted publishing), and publish with npm publish.
@planadecu
planadecu merged commit 1df5bc5 into main Jul 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant