Skip to content

Plugin: updater-cargo

Updates the version field in a Rust Cargo manifest. Use it to keep Cargo.toml aligned with the SemRel version chosen for the release.

Terminal window
semrel plugin install @semrel/cargo

semrel plugin install downloads the binary to .semrel/plugins/ and updates .semrel.lock. Commit .semrel.lock to pin the version for your team.

version: 1
plugins:
- uses: @semrel/cargo
args:
file: Cargo.toml
NameRequiredDefaultDescription
SEMREL_PLUGIN_FILEnoCargo.tomlCargo manifest to update.
  • SEMREL_NEXT_VERSION
  • SEMREL_CURRENT_VERSION
  • SEMREL_TAG_NAME
  • SEMREL_DRY_RUN

For a 1.4.0 release, the updater can change version = "1.3.2" to version = "1.4.0" in Cargo.toml.