This document describes the maintainer release process for ripdiff.
ripdiff follows Semantic Versioning (MAJOR.MINOR.PATCH):
PATCHfor bug fixes and internal improvements.MINORfor backwards-compatible features.MAJORfor breaking changes.
Releases are driven by git tags.
The GitHub Actions workflow in .github/workflows/release.yml runs when a tag matching v* is pushed. It:
- Checks that the tag version matches
Cargo.toml. - Verifies the crate can be packaged.
- Publishes the crate to crates.io.
- Creates a GitHub release for the tag.
To publish from CI, the repository must have a CARGO_REGISTRY_TOKEN secret containing a crates.io API token.
Use cargo-release to bump the crate version and create the matching tag in one step.
Releases should only be cut from main. This keeps each published version tied to the reviewed, canonical branch state and avoids accidentally releasing from an unmerged branch or local-only commit. The repository's cargo-release configuration enforces this with allow-branch = ["main"].
Install it once:
cargo install cargo-releasePreview a release:
cargo release patchRun a release:
cargo release patch --executeReplace patch with minor or major as needed.
With the repository configured for cargo-release, the executed command should:
- Update
Cargo.tomlto the next version. - Create a release commit.
- Create a matching tag like
v0.1.1. - Push the commit and tag to
origin.
After the tag is pushed, GitHub Actions performs the actual crates.io publish and creates the GitHub release.
- Ensure CI is green locally or on
main:cargo fmt cargo clippy --all-targets --all-features cargo test cargo build - Run a dry run:
cargo release patch
- Execute the release:
cargo release patch --execute
- Verify the GitHub Actions release workflow succeeds.
- Verify the new version appears on crates.io.