8000
Skip to content

misc: fix OIDC Trusted Publishing authentication - #17100

Merged
connorjclark merged 2 commits into
mainfrom
fix-publish-more
Jun 26, 2026
Merged

misc: fix OIDC Trusted Publishing authentication#17100
connorjclark merged 2 commits into
mainfrom
fix-publish-more

Conversation

@connorjclark
Copy link
Copy Markdown
Collaborator

No description provided.

…-url

When actions/setup-node is configured with registry-url, it creates an .npmrc file that expects a NODE_AUTH_TOKEN. If this token is missing, older versions of npm (like the one shipped with Node 22) will send an empty authentication token to the registry during 'npm publish' instead of falling back to the OIDC Trusted Publishing authentication path.

Removing registry-url ensures npm relies exclusively on the OIDC token for publishing.
The official npm documentation specifies that Trusted Publishing requires npm version 11.5.1 or later. The version of npm that ships with Node 22 (v10.x) does not fully support the OIDC authentication path when a registry-url (and thus an empty _authToken in .npmrc) is configured.

This restores the recommended registry-url configuration and ensures we upgrade to the latest npm version before publishing.
@connorjclark
connorjclark requested a review from a team as a code owner June 26, 2026 18:02
@connorjclark
connorjclark requested review from paulirish and removed request for a team June 26, 2026 18:02
@connorjclark
connorjclark merged commit f369358 into main Jun 26, 2026
27 of 28 checks passed
@connorjclark
connorjclark deleted the fix-publish-more branch June 26, 2026 18:02
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

0