fix: add --provenance flag for npm OIDC publishing#1041
Closed
sarahdayan wants to merge 3 commits into
Closed
Conversation
…angelog - Replace conventional-changelog-core@9.x with conventional-changelog@7.1.1 - Use new class-based ConventionalChangelog API - Remove add-stream dependency (using async iterators instead) - Remove conventional-changelog-preset-loader (bundled in new package) - Fixes @conventional-changelog/git-client vulnerability (now uses v2.5.1) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add eslint-disable for import/no-unresolved (ESM exports field) - Remove unnecessary async from prepareParams Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When useOidcTokenProvider is enabled, npm publish requires the --provenance flag to use OIDC token authentication. Also added registry-url to setup-node action which is required for OIDC. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Member
Author
|
Closing - needs to be rebased on main and the fix approach needs revision |
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.
Summary
--provenanceflag to npm publish command whenuseOidcTokenProvideris enabledregistry-urlto setup-node action in CI workflow (required for OIDC token injection)Problem
The release workflow failed with
ENEEDAUTHerror because npm OIDC publishing requires the--provenanceflag to authenticate via OIDC tokens instead of traditional NPM_TOKEN.Solution
useOidcTokenProvideroption togetPublishCommand()--provenanceflag to the npm publish command when OIDC is enabledregistry-urlin the setup-node action