Repository navigation
build(release): add git-cliff version-bump script - #20
Merged
Merged
Conversation
Adds `bun run release:prep`, which computes the next semver from the Conventional Commits since the last tag (via git-cliff — breaking → major, feat → minor, else → patch), writes it to package.json, and regenerates CHANGELOG.md so the unreleased section is filed under the new version. It stops short of committing or tagging, so the release still goes through a normal reviewed `chore(release): <version>` PR and the existing tag-triggered release.yml — it just removes the hand-editing that set the version for v0.0.2 and v0.0.3.
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.
What
Adds
bun run release:prep— automated version bumping driven by git-cliff, so cutting a release no longer requires hand-editingpackage.json(which we did manually for v0.0.2 and v0.0.3).How it works
scripts/release-prep.tsruns git-cliff to compute the next semver from the Conventional Commits since the last tag:feat:fix,ci,build, …)It then writes that version into
package.json(touching only the version line, so Biome's formatting stays intact) and regeneratesCHANGELOG.mdwith the unreleased commits filed under the new version.It deliberately does not commit, tag, or push — so the release still goes through a reviewed
chore(release): <version>PR and the existing tag-triggeredrelease.yml. It just removes the manual version edit.If there are no releasable commits since the last tag, it reports that and makes no changes.
Verified locally
Ran it against the real history (last tag
v0.0.3):The
CHANGELOG.mdcorrectly grew a[0.0.4]section grouping the commits. (The test bump was reverted — this PR does not change the version; it only adds the tooling.)Contents
scripts/release-prep.ts— the bump script (typechecks underscripts/tsconfig.json).package.json—release:prepscript +git-cliffdevDependency (the npm wrapper that vendors the 2.13.1 binary, matching the versionrelease.yml's git-cliff-action uses).docs/development.md— a new Releasing section documenting the full flow (previously undocumented).Notes
scripts/).git-cliff, andbun auditis clean with it added.release:prepkeepsCHANGELOG.mdcurrent in the bump PR, and the pipeline's post-tag regeneration becomes a confirming no-op.verifygate.Possible follow-up
If you later want zero-touch releases, this same git-cliff foundation can drive a scheduled/standing "release PR" (release-please style). For now it keeps the human gate you preferred.