This repository uses release-plz to automate:
- version bumps
- changelog updates
- crates.io publishing
- GitHub releases
- On every push to
mainthe workflow runsrelease-plz release-pr. - If there are releasable changes, release-plz opens a Release PR updating:
- crate versions (per-crate, based on each crate’s
Cargo.toml) - the root
CHANGELOG.md
- crate versions (per-crate, based on each crate’s
- The workflow automatically applies the label
release-plzto that PR. - After the Release PR (labeled
release-plz) is merged, the workflow runsrelease-plz releasewhich:- publishes crates to crates.io (only crates that are publishable and have a new version)
- creates GitHub Releases
Workflows:
- Root workspace:
.github/workflows/release-plz.yml
Publishing is controlled by Cargo manifests:
- crates with
publish = falseare never published - crates without
publish = falseare publishable (subject to crates.io rules)
This repo is configured so that:
apps/**andexamples/**are not publishable (we setpublish = false)libs/**andmodules/**are publishable as intended
- Framework (
libs/modkit-*): share a single version viaversion.workspace = trueand the root workspace version (Cargo.toml→[workspace.package] version). - System SDKs (
libs/system-sdks/**): each crate has its own explicit version. - Modules (
modules/**): each module and each*-sdkhas its own explicit version.
release-plz publishes crates in the correct order for intra-workspace dependencies.
Before publishing, the root release workflow runs:
cargo test --workspace --no-fail-fast --exclude cyberware-modkit-macros-tests --exclude cyberware-modkit-db-macrosIf you need a hotfix / manual release, prefer triggering the GitHub Actions workflow instead of publishing locally:
- Ensure versions are bumped (edit the relevant
Cargo.tomlversion fields) and the change is on the target branch. - Go to GitHub → Actions → Release (release-plz) → Run workflow.
- Select
mode = release(publishes crates + creates GitHub Releases).
Note: the workflow already runs tests before publishing. Running tests locally is optional and just gives faster feedback.
cargo test --workspace --no-fail-fast --exclude cyberware-modkit-macros-tests --exclude cyberware-modkit-db-macrosFallback if CI is unavailable: publish locally from a clean checkout (you must have CARGO_REGISTRY_TOKEN set):
export CARGO_REGISTRY_TOKEN=*** # your crates.io token
cargo publish -p <crate_name>- crates.io rate limiting (HTTP 429) can happen when publishing many crates for the first time. If the publish job fails with 429, just re-run the same workflow after the timestamp shown in the error. The process is idempotent: already-published crates will be skipped on retry.