ci: make Cut Release version input optional, defaulting to the next patch - #29
Merged
Conversation
…atch An empty version (now the workflow default) makes release.sh compute the next patch version from package.json — matching npm-version-patch semantics, prereleases promote to their release — and run the same gate, tag, and push flow. An explicit semver still pins the version, and the interactive prompt accepts an empty answer for the same patch-bump behavior. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LekzRRztX696SLGyefENYm
boristane
approved these changes
Aug 13, 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.
Requested by boris · Slack thread
Before / After
Before: running the "Cut Release" workflow requires typing a version by hand — an empty input fails in CI (
version argument required in CI).After: the
versioninput is optional. Leave it empty (the default) and the release cuts the next patch version, computed from the currentpackage.jsonversion (e.g.0.2.5→0.2.6). An explicit version still pins the release exactly as before, and the local interactive prompt now also accepts an empty answer to mean "next patch".How
release.sh: when no version is given (arg or prompt), compute the next patch frompackage.jsonwith a smallnode -pone-liner that matchesnpm version patchsemantics (x.y.z→x.y.(z+1); a prerelease is promoted to its release version). The computed version then flows through the unchanged existing path — semver validation, tag-existence checks,npm version, tag name, and commit message all derive from the resulting version, and the log prints it (no version given — next patch: 0.2.5 → 0.2.6).cut-release.yml:versionbecomesrequired: falsewith an empty default; an emptyVERSIONarg hits the same "next patch" path inrelease.sh. Added arun-nameso the Actions list showsCut Release — <version|next patch> (dry run)at a glance; the job log always shows the real resulting version.dry_runis untouched: full gate, bump reverted, no commit/tag/push, no secrets loaded.Validation
bash -n release.shandactionlinton the workflow: clean.CI=1 RELEASE_DRY_RUN=1 ./release.shwith no version (in a scratch clone with the branch checked out asmain): computed0.2.5 → 0.2.6, full gate passed (codegen against the live prod spec, typecheck, lint, test, build), bump reverted, tree clean.0.9.9): pinned, gate passed, reverted../release.sh not-a-versiondies withinvalid semver; empty interactive answer resolves to the next patch and still hits the existing tag-collision guards.Generated by Claude Code