ci: publish via OIDC trusted publishing with provenance#50
Merged
Conversation
Switch the release workflow from a long-lived NPM_TOKEN to npm OIDC trusted publishing, eliminating the stored token entirely. - Remove NPM_TOKEN env var and the .npmrc auth-token step; the id-token: write permission (already present) lets pnpm's native publish exchange the GitHub OIDC token for a short-lived publish token. - Set registry-url so the OIDC token exchange targets npmjs.org. - Add --provenance to pnpm publish so attestations are generated. - Add repository field to package.json, required for provenance. Everything in the release pipeline now runs through pnpm.
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates package.json to include the repository field pointing to the Git repository URL. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #50 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 19 19
Branches 1 1
=========================================
Hits 19 19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jaredwray
commented
Jun 9, 2026
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
Moves the release workflow from a long-lived
NPM_TOKENto npm OIDC trusted publishing with provenance attestations, removing the stored secret entirely. The whole release pipeline now runs throughpnpm.Changes
.github/workflows/release.yamlNPM_TOKENenv var and theSet NPM Auth Tokenstep that wrote a token into.npmrc.id-token: writepermission now lets pnpm's native publish exchange the GitHub OIDC token for a short-lived publish token — no secret required.registry-url: 'https://registry.npmjs.org'toactions/setup-nodeso the OIDC token exchange targets the npm registry.--provenancetopnpm publishso signed provenance attestations are generated and published.package.jsonrepositoryfield. npm requires this to generate provenance statements; publish would fail without it.How it works
pnpm@11.5.2(pinned viapackageManager) uses its native publish implementation, which supports OIDC trusted publishing. When run from GitHub Actions withid-token: write, pnpm detects the OIDC environment and exchanges the token automatically — noNPM_TOKENneeded. With trusted publishing +--provenance, npm publishes provenance attestations linking the package to this repo and workflow run.A trusted publisher must be configured for
@hyphen/react-sdkon npmjs.com (one-time, by a package owner):https://www.npmjs.com/package/@hyphen/react-sdk/access).Hyphenreact-sdkrelease.yamlUntil this is configured, publishing will fail with a
404(npm can't match the run to a trusted publisher). No environment changes are needed in this repo beyond what's in this PR.Notes
--provenance; trusted publishing needs npm/pnpm with OIDC support (pnpm 11.5.2 ✓) and Node ≥ 22.14.0 (workflow uses Node 24 ✓).README.md'snpm installline is end-user install guidance for consumers and is intentionally unchanged.https://claude.ai/code/session_01HF9jcEMiFbSCB9eocTmybh
Generated by Claude Code