Repository navigation
refactor(release): run the release flow with release-plz, not a hand-written bot - #183
Merged
Merged
Conversation
…written bot The owner's rule: use an existing public solution wherever one does the job, and hand-write only where none reliably does. #178's bot was hand-written around git-cliff; release-plz (0.4.3, through release-plz/action v0.5.148) does the release-candidate pull request, the version in Cargo.toml and Cargo.lock, CHANGELOG.md, the tag and the GitHub release. - Remove cliff.toml, release-pr.yml, release-pr.sh and its test. - release-plz.toml: git_only; every crate in one version_group; one tag and release, v{{ version }}, made for thrust-core, with git_tag_name set for the whole workspace (set only on thrust-core, the other crates looked for tags of their own and re-released all of history); one root CHANGELOG.md; release_always = false with pr_branch_prefix "rc/" (the source matches the configured prefix; the docs still say release-plz-); release_commits for fixes, features, performance, refactors, reverts and breaking changes; a feature bumps the minor in 0.x. Branches are rc/<timestamp>: release-plz takes only a prefix. - release-plz.yml: the release and release-pr jobs, as the release GitHub App, skipped until RELEASE_APP_CLIENT_ID is set. - check-release-plz.py, the one hand-written piece: release-plz has no workspace-level version group and does not check that every crate is listed. Run by deps, tested in ci-scripts (71 checks, 9 of 9 hand mutants caught); release-plz.toml alone now runs the Rust set. - The workspace version is 0.1.0, so the first release is v0.1.0 (release-plz releases an untagged package at the version it holds). - Each setting checked with release-plz 0.4.3 on a copy of main: the first release, nothing right after the tag, a fix (0.1.1, one Cargo.toml line, cargo metadata --locked passes), a feature and a breaking chore (0.2.0), test/docs commits and a web/-only fix (nothing). A change outside the crates is released by hand, as cicd.md describes; release-plz set-version is not the tool (it writes the one crate's own version). Refs: #49 Co-Authored-By: Claude Opus 5.5 <[email protected]>
aRustyDev
added a commit
that referenced
this pull request
Nov 15, 2026
…) into the OpenAPI Projects branch #183 merged while #179 was waiting for its first run, and conflicted with it a second time. One conflict, `.github/workflows/ci.yml`, the end of the `deps` job: #183 renamed the release step to "Release configuration and workflow guards" and rewrote its `env` and `run` (`SECRET_JOBS: release release-pr`, `check-release-plz.py`, the `release-plz.yml` lint), directly above this branch's "OpenAPI schema diff (oasdiff)" step. Main's step is taken whole and the OpenAPI step stays after it, unchanged. `Cargo.toml`, `Cargo.lock` and `docs/src/architecture/cicd.md` merged without a conflict. `cargo metadata --locked` resolves the lockfile with `utoipa` and #183's changes together, the merged `ci.yml` parses with both steps in `deps`, and `scripts/check-openapi.sh` gives the same 37 findings, 0 unaccepted, with its four controls refused. Refs: #58 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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
This replaces #178's hand-written release bot with release-plz, following your rule: use a public solution wherever one does the job. The bot pinned here is release-plz 0.4.3, run through
release-plz/actionv0.5.148 (pinned by SHA).On every push to
main, release-plz does the following:rc/<timestamp>, titledchore(release): vX.Y.Z. The PR sets the version inCargo.tomlandCargo.lockand adds a section to the rootCHANGELOG.md. The commit is made through the API, so GitHub signs it.rc/*PR merges, it tagsvX.Y.Zand publishes the GitHub release. Every other push does nothing.cliff.toml,release-pr.yml,release-pr.sh,test-release-pr.shrelease-plz.toml,release-plz.ymlcheck-release-plz.pyand its test: the one hand-written piece, explained belowThe workspace version is now
0.1.0, so the first release isv0.1.0. release-plz releases an untagged package at the version it already holds.Each setting, checked on a copy of
mainwith release-plz 0.4.3v0.1.0changelog section, no version changev0.1.0tagthrust-apiv0.1.1: oneCargo.tomlline changes,cargo metadata --lockedpasses, the changelog lists only that fixchore!:v0.2.0test:ordocs:commits that touch cratesrelease_commits)web/Two settings that the docs don't settle were checked in the source or by trial:
release_always = false. In v0.4.3's source, this matches the configuredpr_branch_prefix(rc/). The docs still sayrelease-plz-.git_tag_name = "v{{ version }}"is set for the whole workspace. When it was set only onthrust-core, the other 17 crates looked for tags of their own, found none, and re-released all of history.Deviations you chose
rc/<timestamp>, notrc/vX.Y.Z, because release-plz only takes a prefix. The version appears in the PR title.web/,scripts/ore2e/alone never opens an rc PR. You can release one by hand (steps incicd.md): anrc/manual-*branch, edit the one[workspace.package]version line, runcargo update --workspace, add a changelog section, and merge. I checked thatcargo update --workspacemoves all 18 crates and keeps--lockedpassing.release-plz set-versionis the wrong tool for this: it wrote the version intothrust-core's ownCargo.toml, breaking the shared version.The one hand-written piece
release-plz has no workspace-level
version_groupand doesn't check that every crate is listed. A new crate missing fromrelease-plz.tomlwould silently leave the shared version.check-release-plz.pycloses that gap. It reads both files with Python's built-intomlliband runs indeps. Its test has 71 checks and runs every break against each crate. All 9 hand-made breaks of the script were caught.release-plz.tomlalone now runs the Rust set, so the guard runs whenever the config changes.Checks run locally
ci-scriptstest under dash.depsguards that don't build, including the new one.lint-workflow.shwithSECRET_JOBS="release release-pr". Its control fails without that variable, as it should.actionlint.thrust-compat-plane's 894 tests at version0.1.0.instance.current_versioncomes fromCARGO_PKG_VERSION, and the parity fixtures normalise it.Not verified until the App exists
The
releaseandrelease-prjobs themselves haven't run; they're skipped untilRELEASE_APP_CLIENT_IDis set.Supply-chain note: release-plz publishes no attestation for its binaries (
gh attestation verifyfinds none). The action installs it withcargo-binstall.The owner steps are the same as for #178. If a tag ruleset restricts tag creation, the App also needs Administration: read and write, which release-plz documents for protected tags.
Refs: #49
🤖 Generated with Claude Code