chore(release): add bump-my-version for release automation - #41
Merged
Conversation
Adds [tool.bumpversion] so `uvx bump-my-version bump patch|minor|major` handles the mechanical release steps: bump project.version, promote the CHANGELOG [Unreleased] section to a dated release header, update the compare links, and make a GPG-signed commit + signed tag vX.Y.Z. `uv lock` and `git push --follow-tags` remain manual follow-steps (documented in the config comment). Version stays single-sourced — project.version is auto-handled since the config lives in pyproject.toml. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018DiZwx1UJrf7wu3suBzq6x
Add a "Releasing (maintainers)" section to CONTRIBUTING.md and a changelog Infrastructure entry for the release automation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018DiZwx1UJrf7wu3suBzq6x
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.
Summary
Adds bump-my-version config (
[tool.bumpversion]inpyproject.toml) to automate the mechanical release steps that were done by hand — the version bump, the CHANGELOG promotion, and the signed tag.Why (and why scoped this way)
The version lives in one place (
pyproject.toml;graphlm_version()reads installed metadata), so the usual "keep N version strings in sync" motivation doesn't apply here. The step that actually had manual friction was the CHANGELOG dance — promoting## [Unreleased]to a dated section and fixing two compare links every release. This config automates exactly that, plus the signed commit + signed tag.What
uvx bump-my-version bump patchnow doesproject.versionandtool.bumpversion.current_version0.1.2 → 0.1.3(single source stays consistent —project.versionis auto-handled since the config lives inpyproject.toml).## [X.Y.Z] - <utc date>header below the permanent## [Unreleased](keeps[Unreleased], doesn't rename it).[Unreleased]compare link and adds the new version's compare link (one order-independent replacement).chore(release): X.Y.Z+ signed tagvX.Y.Z.uv lockandgit push --follow-tagsremain manual (documented in the config comment and CONTRIBUTING.md's new "Releasing" section) — bump-my-version doesn't run them.Verification
Verified with
--dry-run --verbose(a real 0.1.2 → 0.1.3 dry-run, no writes) — the planned changes are exactly correct: both version strings, the CHANGELOG header inserted under a now-empty[Unreleased]with the shipping content correctly under the new dated header, both compare links, and the signed commit + tag. Also:uv buildworks, 395 tests pass, mypy clean.Config syntax grounded in bump-my-version's own docs (
docs/howtos/multiple-replacements.md,docs/reference/formatting-context.md).Not included
Left the version single-sourced — deliberately no
__version__constant added (that would reintroduce the duplication the design avoids).🤖 Generated with Claude Code
https://claude.ai/code/session_018DiZwx1UJrf7wu3suBzq6x