A GitHub Action for running cargo-semver-checks
Find a file
2023-02-27 16:42:26 -05:00
.github Use matrix strategy in CI 2023-02-27 16:42:26 -05:00
dist Proper error handling 2023-02-27 16:42:26 -05:00
src Proper error handling 2023-02-27 16:42:26 -05:00
.eslintrc.cjs Add eslint and prettier (#10) 2023-02-27 16:42:26 -05:00
.gitignore brand-new action in node.js (#4) 2023-02-27 16:42:26 -05:00
.npmrc brand-new action in node.js (#4) 2023-02-27 16:42:26 -05:00
.prettierrc.json Add eslint and prettier (#10) 2023-02-27 16:42:26 -05:00
action.yml Add github-token input (#13) 2023-02-27 16:42:26 -05:00
LICENSE Initial commit 2022-07-20 18:45:54 -04:00
package-lock.json Add eslint and prettier (#10) 2023-02-27 16:42:26 -05:00
package.json Add eslint and prettier (#10) 2023-02-27 16:42:26 -05:00
README.md Add github-token input (#13) 2023-02-27 16:42:26 -05:00
tsconfig.json Add ending newlines 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
github-token The GITHUB_TOKEN secret, which is necessary to download precompiled binaries from GitHub API. By default, the automatic GitHub token provided to the workflow will be used. The token may be alternatively passed in an environment variable GITHUB_TOKEN.
package The package whose API to check for semver (in Package Id Specification format, see https://doc.rust-lang.org/cargo/reference/pkgid-spec.html for reference). If not set, all packages in the workspace are processed.
manifest-path Path to Cargo.toml of crate or workspace to check. Has an effect only if package is not specified.
verbose Enables verbose output of cargo-semver-checks. false

Scenarios

Use in workspaces with more than one crate

By default, if workspace contains multiple crates, all of them are checked for semver violations. You can specify a single crate to be checked instead using package or manifest-path.

For example, this will check my-crate:

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