Fix OIDC auth for trusted publishing#5
Merged
Merged
Conversation
actions/setup-node@v4 with registry-url writes
'//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}' into .npmrc.
With NODE_AUTH_TOKEN unset (we use OIDC, not a token), npm sees a
literal placeholder as the auth header and bails with 404 — never
attempting the trusted-publishing OIDC exchange.
Removing registry-url leaves .npmrc clean so npm CLI can fall through
to the OIDC flow. Add publishConfig to package.json so the registry
and access level are recorded in the package itself, and drop --access
public from the workflow command (now redundant). Bump Node to 22.x.
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.
Removes setup-node's registry-url (which injects a placeholder auth token that breaks OIDC fallback), adds publishConfig to package.json, drops redundant --access flag. Bump 0.1.3.