Skip to content

fix: correct npm provenance config in release workflow - #64

Merged
shaungrady merged 1 commit into
mainfrom
claude/fix-release-provenance
Jun 13, 2026
Merged

fix: correct npm provenance config in release workflow#64
shaungrady merged 1 commit into
mainfrom
claude/fix-release-provenance

Conversation

@shaungrady

Copy link
Copy Markdown
Owner

Problem

The Release workflow failed on the merge of #63:

🦋 error Unknown flag for publish: --provenance
🦋 error Usage: changeset publish [--tag <name>] [--otp <code>] [--no-git-tag]

The release script runs changeset publish --provenance, but --provenance has never been a valid Changesets flag. @changesets/cli silently 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:

  • The release pipeline is currently broken on main.
  • Because the flag was being ignored, releases were not actually getting npm provenance before.

Fix

  • Remove the invalid --provenance flag from the release script.
  • Set NPM_CONFIG_PROVENANCE: true in the publish step's env. changeset publish shells out to npm publish, which reads this and emits provenance — the documented Changesets + provenance pattern. The required id-token: write permission 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

`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.
@shaungrady
shaungrady merged commit 3c29909 into main Jun 13, 2026
3 checks passed
@shaungrady
shaungrady deleted the claude/fix-release-provenance branch June 13, 2026 05:23
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.

2 participants