Publish Rust crates from CI with a Release PR.
open sourceMIT OR Apache-2.0self-hostablefree
release-plz automates releasing Rust crates from CI. On each push it opens or updates a release pull request that bumps versions in Cargo.toml from conventional commits, updates the changelog with git-cliff (Keep a Changelog format by default) and checks for API-breaking changes with cargo-semver-checks; merging it publishes the crates to crates.io or another cargo registry, tags each released package and creates GitHub, Gitea or GitLab releases. It handles Cargo workspaces, needs no configuration to start, and supports crates.io trusted publishing from GitHub Actions. It runs as a CLI or through its official GitHub Action.
Ways to install
Package managers
Problems it solves
- publishing a new version of my Rust crate is a pile of manual steps: bump the version, edit the changelog, tag, cargo publish
- open a pull request with the next version and changelog that I just merge to release my crate
- bump crate versions automatically from conventional commit messages
- catch an accidental breaking API change before I publish a minor version of my library
- release only the crates in my Cargo workspace that actually changed
- publish to crates.io from GitHub Actions without storing a long-lived API token
- generate a changelog for my Rust project from git history
- create GitLab or Gitea releases for my Rust crates, not only GitHub ones
- publish crates to a private cargo registry from CI
Features
- release pull request with version bumps and changelog
- version bumps from conventional commits
- changelog with git-cliff (Keep a Changelog by default)
- API-breaking-change detection with cargo-semver-checks
- Cargo workspace support
- publishing to crates.io or any cargo registry
- crates.io trusted publishing from GitHub Actions
- git tag per released package
- GitHub, Gitea and GitLab releases
- optional cargo update before releasing
View 1 more
- official GitHub Action; GitLab CI docs
Limitations
- Releases Rust crates only: it reads Cargo.toml and publishes to cargo registries, not other package ecosystems2
- Can't detect every breaking change: it relies on cargo-semver-checks, which may miss some semver violations3
Capabilities
| Has a command line tool | plan not known |
|---|
Alternatives
The same job
These do what release-plz does.
- release-please Generate release PRs based on the Conventional Commits spec
- Changesets A tool to manage versioning and changelogs with a focus on monorepos
- semantic-release Fully automated version management and package publishing
- dist (cargo-dist) Shippable application packaging: build, sign and publish release binaries and installers from a git tag
- GoReleaser Release engineering, simplified
- Release Drafter Drafts your next release notes as pull requests are merged