Repository navigation
ci: drop registry-url so npm uses OIDC instead of a placeholder token - #38
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Third fix for the stuck 0.6.1 publish.
Diagnosis: every failed attempt showed
NODE_AUTH_TOKEN: XXXXX-XXXXX-XXXXX-XXXXXin the publish step.setup-node'sregistry-urlwrites a placeholder_authTokento .npmrc; npm then uses that bogus token instead of OIDC, and the registry masks the auth failure asE404.Removing
registry-urlmeans 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.