Release skill — genlayer-cli
This repo follows a branch-per-major release model. There is no auto-bump on push. A release happens when a human (or you on their behalf) runs scripts/release.sh on the target stable branch.
When to use this skill
User asks anything like:
- "release v0.39.2"
- "ship a patch"
- "tag the latest fix as a release"
If they ask "publish to npm directly" — refuse and point at this flow. The repo doesn't have an unprotected npm push path; the tag is the only release entry point.
What this repo's release model expects
- Branches are named after the major they ship:
v0.39(current stable). Whenv0.40opens (a major bump in semver-zero terms), the previousv0.39stays read-only for back-ports. - Tags live within those branches:
v0.39.2,v0.39.3, ... - Semver-zero rule: this package is on 0.x, so the MINOR component is the breaking-change boundary.
0.39 → 0.40IS a major bump.scripts/release.shrefuses bothminorandmajorkeywords without--allow-major. - A major (= minor on 0.x) bump means cutting a new branch (
v0.40) — not tagging on the current one. CHANGELOG.mdis updated in the release commit (release-it via@release-it/conventional-changelog).publish.ymlfires on the tag push and does the npm publish + GitHub Release.
Steps
Confirm intent with the user.
- Which version? If unspecified, ask whether it's patch or explicit.
- If they say "minor" or "major" on 0.x, surface that this means cutting a new branch — confirm.
Switch to the target branch + sync.
git checkout v0.39 git pull --ff-only origin v0.39Verify the head is shippable.
- Latest CI green:
gh run list --branch v0.39 --commit "$(git rev-parse HEAD)" --limit 1 - Inspect commits since the previous tag:
git log "$(git describe --tags --abbrev=0)..HEAD" --oneline
- Latest CI green:
Run the release script.
scripts/release.sh <X.Y.Z> # or patchBumps
package.json, prependsCHANGELOG.md, commits, tagsvX.Y.Z, pushes branch + tag. Does NOT publish to npm — CI handles that.Watch the publish workflow.
gh run watchIf
publish.ymlfails (typical: tag/package.json mismatch, NPM_TOKEN, provenance), report verbatim and stop.Confirm on npm.
npm view genlayer dist-tags(Yes — the npm package name is
genlayer, not@genlayer/cli.)
Things to refuse
- Minor or major bump on 0.x without
--allow-major. Those are major bumps in semver-zero and belong on a new branch. - Releasing from
main—mainis retired. - Pushing to the dead
stagingbranch — the beta-channel flow was retired with the auto-bump. If you need a pre-release, tagv0.39.2-beta.0directly via the script with explicit version. - Hand-editing
package.jsonto bump the version — the script keeps everything in lockstep. - Publishing a tag where
publish.ymlfailed — fix the underlying issue, delete the bad tag, re-cut via the script.
Roll-back
- Don't unpublish from npm unless someone with elevated permissions has assessed the impact.
- Deprecate the bad version:
npm deprecate "genlayer@<X.Y.Z>" "broken release; install <X.Y.Z+1> or later" - Ship a follow-up patch via the same flow.
Why no auto-bump?
The previous flow auto-bumped on every push to main (and staging for betas). Trade-off:
- Lost: instant publish on merge.
- Gained: a human checkpoint between "code lands" and "users get it"; no accidental major bumps from
BREAKING CHANGEfooters in PR bodies.
Source: genlayerlabs/genlayer-cli — distributed by TomeVault.