Skip to content

chore: add automated changelog and release workflow (git-cliff + bump-my-version) - Update changelog#110

Open
marvin8 wants to merge 6 commits into
thejchap:mainfrom
marvin8:update-changelog
Open

chore: add automated changelog and release workflow (git-cliff + bump-my-version) - Update changelog#110
marvin8 wants to merge 6 commits into
thejchap:mainfrom
marvin8:update-changelog

Conversation

@marvin8
Copy link
Copy Markdown

@marvin8 marvin8 commented May 13, 2026

Summary

  • Adds git-cliff and bump-my-version to the dev dependencies
  • Adds cliff.toml with commit parsers matching commitizen-style messages
  • Adds justfile with a release recipe orchestrating the full release flow
  • Bootstraps bump-my-version config in pyproject.toml (version tracking for
    Cargo.toml and pyproject.toml itself)
  • Adds an empty CHANGELOG.md as the prepend target
  • Enforces commitizen-style commit messages in AGENTS.md

Release workflow

  1. Computes the next version via bump-my-version show new_version
  2. Generates a changelog entry for unreleased commits via git-cliff --unreleased --prepend
  3. Pauses for manual review/edit of CHANGELOG.md
  4. Commits the changelog update and bumps the version in pyproject.toml and Cargo.toml
  5. Creates a signed git tag and pushes the branch and tag

First-run: manual tag required

git-cliff --unreleased scopes to commits after the most recent semver tag.
The repo has no tags yet, so on first run it would pull the entire commit history
into the changelog.

Before the first just release, create an annotated tag at the last release commit:

git tag -a 0.0.28 3f03d3d -m "0.0.28"
git push origin 0.0.28   # or: git push claude 0.0.28


Closes #104 

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds automated changelog and release tooling: a just release recipe that drives bump-my-version and git-cliff to compute the next semver, generate an unreleased changelog section, pause for manual edit, then commit, tag, and push. Also seeds an empty CHANGELOG.md and codifies commitizen-style commit messages in AGENTS.md. Closes #104.

Changes:

  • New cliff.toml with a custom body template and commit parsers grouping feat/fix/docs/refactor/perf/test/ci and skipping chore.
  • New justfile release recipe orchestrating bump → cliff → manual review → commit → bump-tag → push.
  • bump-my-version config added to pyproject.toml, tracking the version string in Cargo.toml; dev deps gain bump-my-version and git-cliff.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pyproject.toml Adds bump-my-version/git-cliff dev deps and [tool.bumpversion] config (with a Cargo.toml file entry).
cliff.toml git-cliff template and parser config for changelog generation.
justfile New release recipe driving the end-to-end release flow.
CHANGELOG.md Empty file created as the prepend target for git-cliff.
AGENTS.md Documents the commitizen-style commit message requirement.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cliff.toml
"""

[git]
conventional_commits = false
Comment thread pyproject.toml Outdated
Comment on lines +111 to +112
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks legit

Comment thread justfile Outdated
Comment on lines +4 to +12
release type:
#!/usr/bin/env bash
set -euo pipefail
type="{{type}}"

if [[ "$type" != "patch" && "$type" != "minor" && "$type" != "major" ]]; then
echo "Error: argument must be patch, minor, or major (got: $type)"
exit 1
fi
Comment thread justfile Outdated

uv run bump-my-version bump "$type"

git push
@thejchap
Copy link
Copy Markdown
Owner

thank you! i am at pycon the next few days - will take a look at this soon

Copy link
Copy Markdown
Owner

@thejchap thejchap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for working on this @marvin8 !

i like the direction this is heading. there are a few changes to the process that i think i'd like to make - i am not deeply familiar with these tools so will defer to you to let me know if it makes sense to continue using them or switch to something different

  • commit message format - i don't want to be prescriptive on commit message format, or rely on that to generate changelog sections, at least at this stage in the project. i think this is a bit too structured and introduces a bit more friction to iterating than i would like
  • related to the above, is there by any chance a way to instead rely on PR labels to drive changelog categories? for example if i just add 3 simple "Features" "Bug fixes" "Other" labels for now? if not, no problem - can keep it un-sectioned and i will editorialize it manually
  • is it possible to have a section to list contributors for each release (like this)?
  • can we have GH actions publish a GH Release as well now that we'll have the nice changelog?

Comment thread AGENTS.md Outdated
## style guidelines

- comments and docs should be capitalized: <https://google.github.io/styleguide/cppguide.html#Punctuation_Spelling_and_Grammar> and <https://peps.python.org/pep-0008/#comments>
- commit messages must be in commitizen style
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would like to avoid this - i am not a huge fan of being too prescriptive on commit message format

Comment thread pyproject.toml Outdated
Comment on lines +111 to +112
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks legit

Comment thread pyproject.toml Outdated
current_version = "0.0.28"
commit = true
tag = true
tag_name = "{new_version}"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to be "v{new_version}"?

Comment thread justfile Outdated

# Release - Usage: just release patch|minor|major
release type:
#!/usr/bin/env bash
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can we move the shell script itself into scripts/release.sh

@marvin8
Copy link
Copy Markdown
Author

marvin8 commented May 17, 2026

Thanks for the feedback. I am currently busy with something else but should get to addressing your comments later this week.
Also, did you want me to address the comments by copilot as well?

@thejchap
Copy link
Copy Markdown
Owner

@marvin8 sounds good! and yes that would be great, those all look legitimate

marvin8 and others added 2 commits May 19, 2026 13:52
- Remove prescriptive commit-message style guideline from AGENTS.md
- Switch changelog categorization from commit prefixes to PR labels via
  git-cliff GitHub integration; add contributors section to template
- Add [remote.github] to cliff.toml for PR label and contributor data
- Fix tag_name to use v{new_version} prefix in bump-my-version config
- Anchor Cargo.toml version search to [workspace.package] section with
  regex to prevent false matches on pinned dependencies
- Extract inline justfile script to scripts/release.sh; drop justfile
- Rename `type` param to `bump_type` to avoid bash builtin shadowing
- Fix bare `git push` to `git push origin HEAD` for explicit ref
- Add github-release job to release.yml to publish GH Release after
  PyPI publish, using git-cliff to generate release notes from PR labels
@marvin8
Copy link
Copy Markdown
Author

marvin8 commented May 19, 2026

I think I've addressed all review remarks.

Fair warning though, I have never used github actions, so I had Claude Code do that part for me. That might be worth having a good look at.

Other than that, cliff is supposed to use PR labels now and not commits. I've also removed the commit style requirement in your AGENTS.md file.

If I have missed anything, just let me know.

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.

3 participants