Releasing
Versions, the changelog, tags, GitHub Releases, the ghcr.io image, and both
crates.io publishes are driven by release-plz
from conventional-commit history. There is no manual version bump after the
one-time bootstrap below.
One-time bootstrap
Trusted Publishing cannot create a crate on crates.io, and its OIDC exchange fails with an opaque 400 if no publisher is registered yet. These steps are load-bearing in this order:
-
Land the release-automation changes on
main; confirm CI (including thepackagejob) is green. -
Manually publish
0.9.0from a clean checkout of that commit, using a personal crates.io API token:cargo publish -p redmine-client --locked cargo publish -p ruprogress-mcp --lockedThis is the only step that ever needs a long-lived token — it is not stored anywhere in this repo.
-
On crates.io, add four trusted-publisher configs (2 crates × 2 workflow filenames), each with owner
geckonia, reporuprogress-mcp, environmentrelease:release.yml(the hand-pushed-tag /workflow_dispatchpath)release-plz.yml(the automated path — crates.io matches the calling workflow’sworkflow_ref, notjob_workflow_ref, so aworkflow_callfromrelease-plz.ymlpresents that filename, notrelease.yml)
Registering only
release.ymlleaves the automated path broken in a way that only shows up on the second release. -
In the GitHub repo settings: create a
releaseenvironment, and enable Settings → Actions → General → Allow GitHub Actions to create and approve pull requests (release-plz’s PR job needs it). -
Push the
v0.9.0tag by hand.release.ymlfires onpush: tags, builds the Linux x86_64/aarch64 tarballs, creates the GitHub Release, pushes the multi-archghcr.ioimage, and itspublishjob no-ops onalready uploaded— exercising that retry tolerance for real on day one. -
Set the
ghcr.io/geckonia/ruprogress-mcppackage visibility to public and link it to the repository. -
From the next merge to
main, release-plz owns versions, changelog, tag, and release — see the steady-state flow below.
Steady state
- Merge conventional-commit PRs (
fix:,feat:,feat!:/BREAKING CHANGE:, …) tomainas usual. release-plz.yml’srelease-plz-prjob opens or updates a release PR proposing the next version and itsCHANGELOG.mdentry.- Merging that PR runs
release-plz-release, which tagsv<x.y.z>and creates the GitHub Release (git_tag_enable/git_release_enableare pinned to theruprogress-mcppackage inrelease-plz.toml, so exactly one tag is created even though this is a two-crate workspace). - That job’s
publishstep callsrelease.ymlwith the new tag, which builds the tarballs, uploads them to the release, builds and pushes the multi-arch image, and publishes both crates to crates.io via OIDC — no token, no manual step.
Retrying a failed release
- A
release.ymljob failed (build, assets, container, or publish): re-run it withworkflow_dispatch, passing the existing tag (ref: v<x.y.z>). Every job is idempotent:assetsreuses an existing GitHub Release,container/container-manifestoverwrite the same tag, andpublishtreats crates.io’salready uploaded/already existsas success. - The tag or GitHub Release never got created: push it by hand
(
git tag v<x.y.z> && git push origin v<x.y.z>); thepush: tagstrigger picks it up. - crates.io accepted
redmine-clientbut the job died beforeruprogress-mcp: just re-runpublish(viaworkflow_dispatchonrelease.ymlor a re-run of the failed run) — the per-crate-ppublish calls are independently retry-safe.