feat: branch-per-major release model#172
Merged
Merged
Conversation
Aligns this repo with genlayer-node + genvm: branches per major (v1 today; v2 / v2-dev when fees lands), no main, deliberate releases via script + skill. What changes: - publish.yml fires on `push: tags v*` instead of `push: main`. The workflow no longer bumps versions — it just sanity-checks that the tag matches package.json, builds, publishes to npm, and creates the GitHub Release. No commits back to the branch. - scripts/release.sh is the new release entry point. Pre-flight checks: on a v<major> branch, clean tree, in sync with origin, latest CI green. Refuses major bumps without --allow-major (those need a new branch in this model). Then runs release-it with an explicit version to bump package.json, prepend CHANGELOG.md, commit, tag, push — but with npm/github plugins disabled so the dev machine doesn't need npm auth and the GH release is cut by CI from the tag. - .claude/skills/release/SKILL.md documents the flow for Claude: when to use it, what to confirm with the user, what to refuse, and the roll-back path (deprecate, never unpublish blind). - CONTRIBUTING.md explains the branch model + points at the skill. - npm run release → ./scripts/release.sh so the convenience script routes through pre-flight checks (the previous `release-it --ci` invocation bypassed every guard). - .github/e2e-track on this branch points at runner track v0.5 (current stable). v2-dev (when it exists) will point at v0.6-dev. Why kill auto-bump: - Twice landed accidental majors when a BREAKING CHANGE footer in a PR body triggered the conventional-commit bump algorithm — once on this repo (0.28.7 → 1.0.0), once on genlayer-testing-suite (yanked v1/v2 tags). The whatBump cap mitigated future jumps but didn't address the underlying issue: shipping a release shouldn't be a side-effect of merging a PR. - The new flow puts a human checkpoint between "code lands" and "users get it" without losing the bump-and-tag automation. Follow-up (separate PRs): - After this lands: switch default branch on github.com from main to v1, then delete origin/main. - Same shape applied to genlayer-py, genlayer-cli, genlayer-testing-suite, genlayer-explorer (per their existing major). - Runner matrix updates: matrix/v0.5.yaml tooling refs switch from tag pins to branch pins (genlayer-js: v1).
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced May 21, 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
Aligns genlayer-js with the branch-per-major release model used by
genlayer-node(branchesv0.3,v0.4,v0.5with the current major as default; nomain) andgenvm(branchesv0.2.x,v0.3.x; tags within each line).Concretely:
v1is the current stable major (this PR targets it).v<next>-dev(orv2) exists when a next-major is in progress.mainis being retired.scripts/release.sh. CI publishes from the tag push, never from a branch push..claude/skills/release/SKILL.mdwraps the flow for Claude Code, including pre-flight checks and roll-back guidance.Why now: twice already a conventional-commit
BREAKING CHANGEfooter in a PR body triggered an accidental major bump (0.28.7 → 1.0.0here; yanked v1/v2 tags on genlayer-testing-suite). The fix isn't tighter heuristics — it's putting a human checkpoint between "PR merged" and "release published".Changes
.github/workflows/publish.ymlpush: branches: [main]→push: tags: ['v*']. No more version bumping in CI — it now sanity-checkstag == package.json.version, builds, publishes to npm, and cuts the GitHub Release.scripts/release.sh(new, +x)v<major>branch, clean tree, in sync with origin, latest CI green. Refuses major bumps without--allow-major(those need a new branch). Runsrelease-itwith an explicit version +--no-npm.publish --no-github.releaseso the dev machine doesn't need npm auth and the GH release is cut by CI from the tag arrival..claude/skills/release/SKILL.md(new)CONTRIBUTING.mdpackage.jsonnpm run release→./scripts/release.sh(was barerelease-it --ci, which bypassed every pre-flight check)..github/e2e-trackmain→v0.5(the runner's current stable matrix track).Verification
Locally:
End-to-end test of the new publish.yml: I'll do a dry run by tagging a no-op version bump (e.g.
v1.1.9-rc.0) once this lands and the default branch is flipped — call out if you'd rather see that first against this PR.Follow-up (separate PRs, not in scope here)
After this lands:
maintov1. Thengit push origin :main.genlayer-py(v0.18),genlayer-cli(v0.39),genlayer-testing-suite(v0.29),genlayer-explorer(TBD branch — no prior tags).ci-core-e2e-runner/matrix/v0.5.yamltooling refs from tag pins → branch pins (genlayer-js: v1, etc.). Openmatrix/v0.6-dev.yamlas a stub.whatBumpin.release-it.cjsis now belt-and-suspenders (the manual script passes explicit versions) but stays as a safety net. For the 0.x-versioned tooling repos (py / cli / testing-suite), even the script's "minor" bump is a major in semver terms — those scripts will refuseminorwithout--allow-majortoo.Test plan
scripts/release.shrefuses from a non-v branchscripts/release.sh majorrefuses without--allow-majorscripts/release.shrefuses on dirty treescripts/release.shrefuses when local HEAD diverges from originpublish.ymland a release ships end-to-end (will validate with a dry-run rc tag)