Skip to content

chore(release): add bump-my-version for release automation - #41

Merged
ggrace519 merged 2 commits into
mainfrom
chore/bump-my-version-config
Aug 31, 2026
Merged

chore(release): add bump-my-version for release automation#41
ggrace519 merged 2 commits into
mainfrom
chore/bump-my-version-config

Conversation

@ggrace519

Copy link
Copy Markdown
Owner

Summary

Adds bump-my-version config ([tool.bumpversion] in pyproject.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 patch now does

  • Bumps project.version and tool.bumpversion.current_version 0.1.2 → 0.1.3 (single source stays consistent — project.version is auto-handled since the config lives in pyproject.toml).
  • Inserts a dated ## [X.Y.Z] - <utc date> header below the permanent ## [Unreleased] (keeps [Unreleased], doesn't rename it).
  • Rewrites the [Unreleased] compare link and adds the new version's compare link (one order-independent replacement).
  • Makes a GPG-signed commit chore(release): X.Y.Z + signed tag vX.Y.Z.

uv lock and git push --follow-tags remain 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 build works, 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

ggrace519 and others added 2 commits August 30, 2026 22:59
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
@ggrace519
ggrace519 merged commit e5ebf92 into main Aug 31, 2026
7 checks passed
@ggrace519
ggrace519 deleted the chore/bump-my-version-config branch August 31, 2026 03:11
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.

1 participant