ci: publish release with pnpm instead of npm#141
Merged
Conversation
Addresses review feedback on #140 to use pnpm (per AGENTS.md) for the release publish step, while keeping OIDC trusted publishing and provenance. - Replace `npm publish --provenance` with `pnpm publish --provenance --no-git-checks` (--no-git-checks because the release runs from a detached tag checkout) - Drop the `npm install -g npm@latest` step; pnpm 11.6.0 (already pinned via packageManager) performs the OIDC token exchange for trusted publishing - Remove `registry-url` from setup-node so it no longer writes `_authToken=${NODE_AUTH_TOKEN}` to .npmrc — the placeholder that broke pnpm-11 OIDC publishing (pnpm/pnpm#11513) https://claude.ai/code/session_016qHimevBQJsTHzBxV7B2od
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #141 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 8 8
Lines 492 492
Branches 105 101 -4
=========================================
Hits 492 492 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Follow-up to #140 addressing @jaredwray's review feedback to use pnpm for the release publish step (consistent with
AGENTS.md: "Usepnpminstead ofnpmfor all package management commands"). Those comments landed as #140 was merged, so they weren't included there.OIDC trusted publishing + provenance are preserved — only the publishing CLI changes from
npmtopnpm.Changes (
.github/workflows/release.yaml)npm publish --provenancewithpnpm publish --provenance --no-git-checks.--no-git-checksis needed because the release runs from a detached tag checkout (pnpm otherwise refuses to publish when not on a branch).npm install -g npm@lateststep — it's no longer needed. pnpm 11.6.0 (already pinned viapackageManagerand installed bypnpm/action-setup) performs the OIDC token exchange for trusted publishing.registry-urlfromsetup-node. That input makessetup-nodewrite_authToken=${NODE_AUTH_TOKEN}to.npmrc; with no token set, the literal placeholder is exactly what broke pnpm-11 OIDC publishing with a 404 (pnpm/pnpm#11513, fixed in #11526). Removing it eliminates the root cause regardless of pnpm version, and matches thewritrrelease flow.id-token: writeand therepositoryfield inpackage.json(added in #140, required for provenance) are unchanged.Why this is safe with pnpm
.npmrctoken placeholder is written, so OIDC is the sole auth path when no token is present.Reminder (unchanged from #140)
The one-time Trusted Publisher config on npmjs.com for
@hyphen/sdk(GitHub Actions → orgHyphen, reponodejs-sdk, workflowrelease.yaml) is still required before the next release.https://claude.ai/code/session_016qHimevBQJsTHzBxV7B2od
Generated by Claude Code