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.
Installation
Section titled “Installation”semrel plugin install @semrel/cargosemrel plugin install downloads the binary to .semrel/plugins/ and updates .semrel.lock. Commit .semrel.lock to pin the version for your team.
Configuration
Section titled “Configuration”version: 1plugins: - uses: @semrel/cargo args: file: Cargo.tomlEnvironment Variables
Section titled “Environment Variables”| Name | Required | Default | Description |
|---|---|---|---|
SEMREL_PLUGIN_FILE | no | Cargo.toml | Cargo manifest to update. |
Release Context Variables
Section titled “Release Context Variables”SEMREL_NEXT_VERSIONSEMREL_CURRENT_VERSIONSEMREL_TAG_NAMESEMREL_DRY_RUN
Behavior
Section titled “Behavior”For a 1.4.0 release, the updater can change version = "1.3.2" to version = "1.4.0" in Cargo.toml.