Repository navigation
fix(release): derive the version bump from commit types (#54) - #60
Merged
Merged
Conversation
This was referenced Oct 8, 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.
Description
The release workflow always bumped the patch number (
release.yml"Bump patch version"), while AGENTS.md said version bumps derive from commit types. As a result, #47 (feat!:) shipped as v0.2.22 and #53 (fix!:) as v0.2.26, both as patch releases with hand-written breaking-change notes.This PR derives the bump from every commit since the latest
vX.Y.Ztag. The rule is defined indocs/release-versioning.md:release-asRelease-As: vX.Y.Z(the newest one decides)breakingtype!:/type(scope)!:subject, or aBREAKING CHANGE:/BREAKING-CHANGE:linefeaturefeat:/feat(scope):subjectotherno-tagvX.Y.Ztag* …bullets, and those don't count.--notes-filealongside--generate-notes, so breaking changes reach the notes without hand-editing.Release-As. It sets the version exactly. A malformed value, or one not greater than the latest tag, fails the bump step before any tag is created. Because only the newestRelease-Asdecides, a bad footer is fixed by merging a corrected one.mainstill releases. Apart from theversionstep and--notes-fileongh release create, nothing inrelease.ymlchanged. The tag search is now limited to tags reachable from HEAD (--merged HEAD).Closes #54
Implementation
scripts/release-version.shandscripts/release-notes.sh: plain bash, portable to macOS bash 3.2. They readgit log -z --format=%B <tag>..HEADon stdin.scripts/release-version_test.sh: 51 cases, each named after its rule row. They include an end-to-end case that pipes a realgit logfrom a throwaway repo.make test-releaseand a new CI job,release-scripts.8bfac4dand0cd1ad9failed every case before the scripts existed.docs/repo-standard.mdhas a one-line pointer.Dry runs against real history
Generated notes for
v0.2.25..b2cf1b2:Merging this PR cuts v0.3.0
The squash body carries a
Release-As: v0.3.0footer. That version reflects the breaking changes that shipped as patches (#47 in v0.2.22, #53 in v0.2.26). Please squash-merge (not rebase: a rebase merge would put the RED commits onmainand drop the footer) with exactly the message below. TheRelease-As:line must start at column 0. If GitHub's default squash body is used instead, this releases as v0.2.27; recover by merging a follow-up commit carryingRelease-As: v0.3.0.fix(release): derive the version bump from commit types (#54)Type of change
Implementation(s) changed
release.yml,ci.yml,scripts/,Makefile)Testing
make test-release:51 passed, 0 failedunder macOS/bin/bash3.2. Also 51/51 under bash 5 (Docker, with git installed).koalaman/shellcheck:stable) onscripts/*.sh: clean. actionlint 1.7.12 on the workflows: clean.make test-all/make test-integration: not run, because no product code changed.Not testable before merge: the
versionjob on a real Actions runner. The first real run is this PR's own merge, which is expected to producev0.3.0.Checklist