A GitHub Action for running cargo-semver-checks
Find a file
2023-02-27 16:42:26 -05:00
.github Add TODO comments 2023-01-03 09:45:54 -05:00
action.yml Remove unused options 2023-02-27 16:42:26 -05:00
LICENSE Initial commit 2022-07-20 18:45:54 -04:00
README.md Remove unused options 2023-02-27 16:42:26 -05:00

cargo-semver-checks-action

Lint your crate API changes for semver violations.

- name: Check semver
  uses: obi1kenobi/cargo-semver-checks-action@v2
- name: Publish to crates.io
  run: # your `cargo publish` code here

Input options

Every argument is optional.

Input Description Default
crate-name The crate whose API to check for semver. If not set, all crates in the workspace are processed.

Scenarios

Use in workspaces with more than one crate

By default, if workspace contains multiple crates, all of them are checked against semver violations. You can specify single crate to be checked instead, along with the format used for version tags for that crate:

  • crate-name specifies the crate to check, and
  • version-tag-prefix sets the text prepended to the version number to create the git tag for that release.

For example, this will check my-crate whose releases are tagged as my-crate-v1.2.3:

- name: Check semver
  uses: obi1kenobi/cargo-semver-checks-action@v1
  with:
    crate-name: my-crate
    version-tag-prefix: my-crate-v
- name: Publish my-crate to crates.io
  run: # your `cargo publish` code here