Repository navigation
ci: automate npm releases (staged for approval; auto patch, approved minor, never major) - #21
Merged
Merged
Conversation
- release.yml: every push to main runs CI (ci.yml is now reusable), then publishes the next patch version if src/, packages/ or package.json changed since the last release. Docs/CI/test-only changes don't release. - Minor versions only with the maintainer's approval: run the Release workflow by hand with bump = minor (restricted to the repo owner). - Major versions are never automated. - Publishes via npm trusted publishing (OIDC, no stored token, provenance), then pushes a vX.Y.Z tag and creates a GitHub release with the shipped commits. The previous release is found by its tag, or by the gitHead npm recorded when there's no tag. - CONTRIBUTE.md: document the release process Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015pLhuJbdhCyvDro7o6h1wp
3 of 4 tasks
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
Automates npm releases. Every release is staged on npm and goes live only after the maintainer approves it on npmjs.com, with 2FA.
x.y.Zmainthat changessrc/,packages/orpackage.jsonruns CI and, if it passes, stages the next patch.x.Y.0bump: minor. Restricted to the repo owner.X.0.0npm stage publishwith npm trusted publishing (OIDC). npm recommends stage-only trusted publishers. No token is stored, and provenance is generated.npm stage approve <stage-id>. Reject withnpm stage reject <stage-id>.vX.Y.Ztag and a draft GitHub release listing the shipped commits. The job summary shows how to approve.v*tags, so a push made while a release is still waiting stages the next patch instead of failing.ci.ymlis now reusable. Pushes tomainrun it throughrelease.yml, and staging only happens after it passes.package.json's version isn't committed back; the workflow sets it at release time.CONTRIBUTE.mddocuments the process.After merging
3.0.1(everything from feat: CLI flags, feature generator, validation, OpenAPI docs, Docker and Drizzle #20). Approve it on npmjs.com to make it live.3.1.0instead, reject the staged 3.0.1, then run the workflow manually withbump: minor.Test plan
3.0.0 → 3.0.1from the 2 shipped commits since5fab950fix:→ patchfeat!:withBREAKING CHANGE→ still patchminor→3.1.0major→ rejectedv3.0.1is staged but npm still says 3.0.0 →3.0.2npm stage publish --dry-run --access publicaccepts the flags and packs 67 files (51 kB)🤖 Generated with Claude Code
https://claude.ai/code/session_015pLhuJbdhCyvDro7o6h1wp