fix: correct npm provenance config in release workflow - #64
Merged
Conversation
`changeset publish` never accepted a `--provenance` flag (only --tag/--otp/--no-git-tag). @changesets/cli silently ignored it through 2.29.x, but 2.31.0 validates flags strictly and now errors: "Unknown flag for publish: --provenance", failing the release job. Drop the invalid flag and enable provenance the supported way: set NPM_CONFIG_PROVENANCE=true in the publish step env, which npm reads when changeset publish shells out to `npm publish` (id-token: write is already granted). This also means provenance is actually applied now, rather than being silently dropped as before.
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.
Problem
The Release workflow failed on the merge of #63:
The
releasescript runschangeset publish --provenance, but--provenancehas never been a valid Changesets flag.@changesets/clisilently ignored it through 2.29.x; 2.31.0 (bumped in #63) validates flags strictly and now errors, failing the publish step.This only surfaces on the publish path (
No changesets found → attempt publish); recent runs took the version-PR path, so it stayed hidden until now. Two consequences:main.Fix
--provenanceflag from thereleasescript.NPM_CONFIG_PROVENANCE: truein the publish step's env.changeset publishshells out tonpm publish, which reads this and emits provenance — the documented Changesets + provenance pattern. The requiredid-token: writepermission is already granted on the release job.Net effect: the publish step runs cleanly and provenance is genuinely applied (for the first time).
No changeset — release/CI tooling only, no impact on the published package's API or behavior.
https://claude.ai/code/session_01PPFXbZAE4r5FK8mKhRbXG4
Generated by Claude Code