semantic-release-cargo integrates a cargo-based Rust project with [semantic-release].
Specifically it provides sub-command for each of the verifyConditons
, prepare
,
and publish
steps of [semantic-release].
Install semantic-release-cargo
with npm:
bash
$ npm install --save-dev --save-exact @semantic-release-cargo/semantic-release-cargo
Add semantic-release-cargo to your semantic-release
configuration using the semantic-release/exec
plugin. For example, in .releaserc.json
:
json
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
"@semantic-release-cargo/semantic-release-cargo"
]
}
semantic-release-cargo
expects (and verifies) that the environment variable
CARGO_REGISTRY_TOKEN
is set. It should be set to an API Access token for crates.io
access. You likely want to set this through the secrets mechanism of your CI provider.
If you're not keen to mix npm with your Rust project, you can use the [semantic-release-action].
Here is an example using semantic-release-action, presented with the disclaimer that I'm not familiar with this action myself.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in semantic-release-cargo by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
This repository has been forked from [kettleby/semantic-release-rust]. All credit goes to the original author.