👷 [RUM-15055] fix npm publish OIDC auth after v0.1.3#89
Merged
Conversation
- check ACTIONS_ID_TOKEN_REQUEST_URL is set (id-token: write pre-condition) - report .npmrc state as diagnostic - exchange OIDC token with npm registry using correct endpoint and auth header - decode JWT claims for easier Trusted Publishers diagnosis - collect all failures before exiting
- Drop registry-url from actions/setup-node: it writes .npmrc with
_authToken=${NODE_AUTH_TOKEN} which would cause ENEEDAUTH if OIDC
ever fails, since npm falls back to the empty token
- Remove NODE_AUTH_TOKEN: '' workarounds (no longer needed)
cdn34dd
approved these changes
Apr 8, 2026
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.
Motivation
npm publishes have been failing since v0.1.0. Root cause: the npm Trusted Publishers config had
@DataDogin the "Organization or user" field, but npm matches it exactly against the JWTrepository_ownerclaim (DataDog, no@), returning"OIDC token exchange error - package not found".Secondary:
registry-urlinactions/setup-nodewrites.npmrcwith_authToken=${NODE_AUTH_TOKEN}, causingENEEDAUTHif OIDC fails.Changes
registry-urlfromactions/setup-nodeto eliminate the.npmrc_authTokenfallbackNODE_AUTH_TOKEN: ''workaroundsTest instructions
dry_run: truefrom a tag — all OIDC checks should pass (✅ npm OIDC token obtained,✅ dry-run pack succeeded).npmrcwarning should no longer appear in the dry-run outputChecklist