fix(ci): publish with explicit --provenance to surface OIDC errors#54
Merged
Conversation
Recent releases have failed silently — `npm publish` does no OIDC token exchange, posts anonymously, and the registry returns a misleading 404. The publish step's log shows zero OIDC/provenance/trusted-publisher traces, meaning the npm CLI isn't even attempting the handshake. Adding `--provenance` makes the OIDC code path mandatory: if the runtime is missing the required env vars (e.g. `id-token: write` not being honored by the runner), npm fails fast with a precise error instead of silently degrading to anonymous publish. No-op when OIDC is working — the previous behavior already auto-signed provenance on successful runs; this just makes the requirement explicit and the failure mode visible. Co-authored-by: Cursor <cursoragent@cursor.com>
|
🎉 This PR is included in version 1.15.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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
Recent CI publish attempts have failed with a generic `404 Not Found - PUT`. Investigation showed the npm CLI is publishing anonymously — zero OIDC/provenance/trusted-publisher traces in the log — even though the workflow declares `id-token: write` and Trusted Publishing is configured on the npm package.
Adding `--provenance` makes the OIDC handshake mandatory. The next publish either:
No-op when OIDC is working; the previous behavior was already auto-signing provenance on successful runs (cf. v1.14.0 publish log: `Signed provenance statement with source and build information from GitHub Actions`). This just makes the requirement explicit and the failure mode visible.
Test plan
Made with Cursor
Summary by cubic
Add
--provenancetonpm publishin.releaserc.jsonto require OIDC/Trusted Publishing. This surfaces real OIDC errors and stops silent anonymous publishes that end in 404s.404 Not Found - PUT.Written for commit 8d25e1d. Summary will update on new commits. Review in cubic