Skip to content

ci: make Cut Release version input optional, defaulting to the next patch - #29

Merged
boristane merged 1 commit into
mainfrom
claude/cut-release-auto-patch
Aug 13, 2026
Merged

ci: make Cut Release version input optional, defaulting to the next patch#29
boristane merged 1 commit into
mainfrom
claude/cut-release-auto-patch

Conversation

@claude

@claude claude Bot commented Aug 13, 2026

Copy link
Copy Markdown

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 version input is optional. Leave it empty (the default) and the release cuts the next patch version, computed from the current package.json version (e.g. 0.2.50.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 from package.json with a small node -p one-liner that matches npm version patch semantics (x.y.zx.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: version becomes required: false with an empty default; an empty VERSION arg hits the same "next patch" path in release.sh. Added a run-name so the Actions list shows Cut Release — <version|next patch> (dry run) at a glance; the job log always shows the real resulting version.
  • dry_run is untouched: full gate, bump reverted, no commit/tag/push, no secrets loaded.

Validation

  • bash -n release.sh and actionlint on the workflow: clean.
  • End-to-end CI=1 RELEASE_DRY_RUN=1 ./release.sh with no version (in a scratch clone with the branch checked out as main): computed 0.2.5 → 0.2.6, full gate passed (codegen against the live prod spec, typecheck, lint, test, build), bump reverted, tree clean.
  • Same with an explicit version (0.9.9): pinned, gate passed, reverted.
  • Failure paths: ./release.sh not-a-version dies with invalid semver; empty interactive answer resolves to the next patch and still hits the existing tag-collision guards.

Generated by Claude Code

…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
boristane merged commit 94297bc into main Aug 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants