chore: automate version bumps and releases with release-plz - #26
Draft
sosaucily wants to merge 1 commit into
Draft
chore: automate version bumps and releases with release-plz#26sosaucily wants to merge 1 commit into
sosaucily wants to merge 1 commit into
Conversation
The workspace version lives on one line in Cargo.toml, so two open PRs that both bump it always conflict, and re-bumping after a review dismisses the approval. This repo's history shows the toil: four separate "bump version to X" commits (#10, #15, #20, #24). release-plz maintains a single release PR that bumps the workspace version and writes CHANGELOG.md from the Conventional Commit prefixes since the last tag. A normal PR stops touching the version entirely. Merging the release PR cuts the release. Nothing is published to crates.io — this crate is consumed as a git dependency, so publish = false and no CARGO_REGISTRY_TOKEN is needed. canton-proto-rs is excluded because it carries its own upstream version (3.4.0) rather than inheriting version.workspace. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
👋 This is a proposal from the BitSafe tooling side, opened as a draft for you to
evaluate — not something we plan to merge without your say. Happy to close it if the
trade-offs don't suit this repo.
The problem
The workspace version lives on one line in
Cargo.toml. Two open PRs that both bump italways conflict, and re-bumping after a review trips
dismiss_stale_reviews_on_push—so the approval is lost. Because
require_last_push_approvalis on, whoever pushes thebump can't be the one to approve it either.
This repo's history shows the resulting toil — four separate manual bump commits:
What this changes
release-plzmaintains one rolling release PR that bumpsthe workspace version and writes
CHANGELOG.md, derived from the Conventional Commitprefixes since the last tag. Merging that PR cuts the release and tags it.
A normal PR stops touching the version entirely. No conflicts, no dismissed approvals.
Two files, no changes to any crate:
.github/workflows/release-plz.ymlrelease-plz.tomlWhy
release-plzand notrelease-pleaseWe use
release-pleaseelsewhere, but its Cargo workspace support needs thecargo-workspaceplugin plus a manifest entry per crate, and has known gaps.release-plzis Rust-native and handles a shared[workspace.package] versiondirectly,which is exactly your layout.
It is safe to merge and watch
The
releasejob only acts when the version inCargo.tomlhas no matching git tag.You're at
0.6.1andv0.6.1already exists, so merging this changes nothingimmediately. The first push to
mainafterwards opens a release PR you can read, inspect,and close if you hate it. Nothing is tagged or published until you merge that PR.
Decisions that are yours, not ours
1.
CHANGELOG.mdownership — the big one. You currently hand-maintain it inKeep a Changelog format with an
## [Unreleased]section.release-plz will take over writing this file, and its default output is grouped by commit
type rather than by Added/Changed/Fixed. It's configurable
via git-cliff templates if you want to preserve the current shape, but we didn't presume
to restyle your changelog — tell us what you want and we'll wire it up, or you can keep
the file hand-written by setting
changelog_update = false.2. Conventional Commits become load-bearing. The version bump is derived from
feat:/fix:/feat!:prefixes. Your recent history already does this (feat(registry):,feat(keycloak):,fix:), but older commits don't (Add breaking change note,Fix the serialization). Since PRs here squash-merge, the PR title is what gets read — so thisis a PR-title convention, not a per-commit one. Untyped commits simply don't bump anything.
3. This is the repo's first workflow. There's no
.github/workflows/today. If you'dprefer CI to land before release automation, this can wait.
Config notes
publish = false— consumed as a git dependency, so no crates.io publish and noCARGO_REGISTRY_TOKEN. Only the built-inGITHUB_TOKENis used.git_tag_name = "v{{ version }}"— matches your existingv0.6.1scheme. Withoutit, release-plz would tag per crate (
wallet-v0.6.2).canton-proto-rsexcluded (release = false) — it pins its own upstream version3.4.0rather than inheritingversion.workspace, so it must not move with theworkspace.
examplesexcluded —publish = falsealready, and not public API.actions/checkoutv4.2.2,release-plz/actionv0.5.131).
What we verified, and what we didn't
Verified locally: the workflow YAML and
release-plz.tomlboth parse; the config keys arefrom the current docs; and the crate classification is correct — 6 crates inherit
version.workspaceand are managed, 2 are excluded.Not verified: the actual behaviour of the first run, specifically whether the shared
workspace version produces the single
v0.6.2tag we intend rather than one per crate.That's precisely what the first release PR will show, and it's inspectable before you merge
it. We'd rather flag this than claim it's turnkey.
One more to confirm on the first release PR: this repo requires signed commits on
main.PR merges are signed by GitHub, so we expect this to be fine, but worth a look.
🤖 Generated with Claude Code