fix(ci): use custom publishing to enable npm OIDC #677
+11
−14
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.
Root Cause: changesets/action Doesn't Support OIDC
After PR #676 merged (which successfully installed npm 11.6.2), publishing still failed because:
changesets/actionis designed forNPM_TOKENauthentication and doesn't fully support npm's OIDC trusted publishing.The Problem
As documented in changesets/action issue #515, the action combines two operations in one workflow:
When using the built-in
publishparameter,changesets/actiontries to manage npm authentication itself, which interferes with npm 11.6.2's OIDC auto-detection.Evidence from Workflow Logs
Then:
Solution: Custom Publishing
Use the "custom publishing" approach from the changesets/action README:
changesets/actiononly handles versioning and PR creation (nopublishparameter)pnpm releasewhenhasChangesets == 'false'Workflow Changes
How It Works Now
.prototoolsfrom PR fix(ci): configure npm 11.6.2 in prototools for OIDC support #676)changesets/actioncreates/updates release PRspnpm release→changeset publish→npm publishWhy This Works
The custom publishing approach bypasses
changesets/action's authentication management, allowing npm's built-in OIDC support to work transparently. This is the recommended pattern for custom authentication setups.References
Related