RELEASE.md
May 27, 2025 · View on GitHub
Versioning strategy
For public-api and cargo-public-api we bump
- x.0.0
- no earlier than rustdoc JSON format stabilization.
- 0.x.0
- 0.0.x
- whenever we want to make a release but don't have to/want to bump 0.x.0.
When not to release
- If a package had no x.0.0 or 0.x.0 updates to regular
dependencies(we disregarddev-dependencies) we don't need a new release of that package. 5
How to release
cargo-public-api
- Make sure you have done
cargo install cargo-editto makecargo set-versionavailable. - First release
rustup-toolchain,rustdoc-jsonandpublic-apiif needed, in that order. See below. - Create a local branch.
- Run
to see what is new in the release.tag=$(git tag --sort=-creatordate | grep ^v | head -n1) ; git diff $tag - Update
CHANGELOG.md - Bump version with
If 0.x.0 orcargo set-version -p cargo-public-api x.y.zpublic_api::MINIMUM_NIGHTLY_RUST_VERSIONwas bumped:- Add a new version info entry at version_info.rs
- Run
cargo run --bin update-version-info
- Push branch
MAINTAINER:
- Once PR merges, run https://github.com/cargo-public-api/cargo-public-api/actions/workflows/Release-cargo-public-api.yml workflow from
main(instructions) - Done!
public-api
- Run
to see if a release is needed.tag=$(git tag --sort=-creatordate | grep ^public-api-v | head -n1) ; git diff $tag -- public-api/ - If changes detected, create a local branch.
- Update
public-api/CHANGELOG.md - Bump version with
If 0.x.0 orcargo set-version -p public-api x.y.zpublic_api::MINIMUM_NIGHTLY_RUST_VERSIONwas bumped:- Update version_info.rs
- Run
cargo run --bin update-version-info
- Push branch
MAINTAINER:
- Once PR merges, run https://github.com/cargo-public-api/cargo-public-api/actions/workflows/Release-public-api.yml workflow from
main(instructions) - Done!
rustdoc-json
- Run
to see if a release is needed.tag=$(git tag --sort=-creatordate | grep ^rustdoc-json-v | head -n1) ; git diff $tag -- rustdoc-json/ - If changes detected, create a local branch.
- Update
rustdoc-json/CHANGELOG.md - Bump version with
cargo set-version -p rustdoc-json x.y.z - Push branch
MAINTAINER:
- Once PR merges, run https://github.com/cargo-public-api/cargo-public-api/actions/workflows/Release-rustdoc-json.yml workflow from
main(instructions) - Done!
rustup-toolchain
- Run
to see if a release is needed.tag=$(git tag --sort=-creatordate | grep ^rustup-toolchain-v | head -n1) ; git diff $tag -- rustup-toolchain/ - If changes detected, create a local branch.
- Update
rustup-toolchain/CHANGELOG.md - Bump version with
cargo set-version -p rustup-toolchain x.y.z - Push branch
MAINTAINER:
- Once PR merges, run https://github.com/cargo-public-api/cargo-public-api/actions/workflows/Release-rustup-toolchain.yml workflow from
main(instructions) - Done!
How to trigger main branch workflow
- Go to https://github.com/cargo-public-api/cargo-public-api/actions and select workflow in the left column
- Click the Run workflow ▼ button to the right
- Make sure the
mainbranch is selected - Click Run workflow
- Wait for the workflow to complete
Footnotes
-
But if
public_api::MINIMUM_NIGHTLY_RUST_VERSIONhas been bumped thenpublic-apiandcargo-public-apiby necessity must bump to the same 0.x.0 version for the compatibility matrix. ↩ -
Since we need to be able to add a new row to the compatibility matrix. ↩
-
Because otherwise
CI checkswould fail from 0.0.x updates. ↩ -
E.g. changes to the
public-apipublic API or thecargo-public-apiCLI. ↩ -
Because there are no technical reasons to do it. On the contrary, it creates unnecessary churn for downstream users. ↩