Repository navigation
ci: stage npm releases for maintainer approval (fixes E404 on publish) - #22
Merged
Merged
Conversation
npm trusted publishing recommends stage-only permissions, so releases now use `npm stage publish`: nothing goes live until the maintainer approves it on npmjs.com (2FA). The workflow upgrades to npm 11 (stage needs >= 11.15), tags the version when staged and creates a draft GitHub release. A staged version can't be staged again, so the previous release is now the highest of the npm version and the vX.Y.Z tags: a push made while a release awaits approval stages the next patch instead of failing. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015pLhuJbdhCyvDro7o6h1wp
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 first Release run (from #21) failed at
npm publishwith E404. The trusted publisher on npm is configured stage-only, as npm recommends: it doesn't allow directnpm publish. npm reports a rejected publish as a 404.This fix was pushed to #21's branch after #21 had already merged, so it never reached
main. That run failed before tagging, so nothing was published or tagged. npm still showslatest: 3.0.0.Fix
npm stage publish, which trusted publishers are always allowed. Nothing goes live until the maintainer approves it on npmjs.com, with 2FA.npm stageneeds 11.15 or newer.vX.Y.Ztag and a draft GitHub release. The job summary explains how to approve or reject.v*tags. A push made while a release is still waiting stages the next patch instead of failing, since npm can't stage the same version twice.CONTRIBUTE.mddocuments approving (Staged Packages tab, ornpm stage approve <id>) and rejecting.The versioning rules are unchanged: patch is automatic, minor needs the maintainer's manual run, major is never automated.
After merging
3.0.1. Approve it on npmjs.com, on the package's Staged Packages tab.3.1.0instead, reject the staged 3.0.1 and run the Release workflow withbump: minor.Test plan
3.0.0 → 3.0.1v3.0.1is staged but npm still says 3.0.0 →3.0.2npm stage publish --dry-run --access publicaccepts the flags and packs the same 67 files🤖 Generated with Claude Code
https://claude.ai/code/session_015pLhuJbdhCyvDro7o6h1wp