Skip to content

ci: drop registry-url so npm uses OIDC instead of a placeholder token - #38

Merged
simonepri merged 1 commit into
mainfrom
ci/oidc-no-token
Jun 8, 2026
Merged

simonepri merged 1 commit into
mainfrom
ci/oidc-no-token

Conversation

@simonepri

Copy link
Copy Markdown
Owner

Third fix for the stuck 0.6.1 publish.

Diagnosis: every failed attempt showed NODE_AUTH_TOKEN: XXXXX-XXXXX-XXXXX-XXXXX in the publish step. setup-node's registry-url writes a placeholder _authToken to .npmrc; npm then uses that bogus token instead of OIDC, and the registry masks the auth failure as E404.

Removing registry-url means no token is written, so npm (>= 11.5.1) falls back to OIDC trusted publishing against the default public registry. Also adds a one-line diagnostic that prints whether the OIDC token URL is present and whether a token leaked in.

After merge I'll re-dispatch on main. If it still 404s with no token present, the cause is the npm trusted-publisher config (not the workflow) — see PR discussion.

setup-node's registry-url writes a placeholder _authToken to .npmrc
(NODE_AUTH_TOKEN=XXXXX-...), and npm uses that bogus token instead of
OIDC, so the registry rejects the publish (masked 404). Without it, npm
defaults to the public registry and authenticates via trusted publishing.
@simonepri
simonepri merged commit 4cd0eaa into main Jun 8, 2026
14 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