cargo-semver-checks/README.md

38 lines
1.5 KiB
Markdown
Raw Normal View History

2022-07-21 00:45:54 +02:00
# cargo-semver-checks-action
Lint your crate API changes for semver violations.
2022-08-02 20:41:03 +02:00
```yaml
2022-08-02 20:41:03 +02:00
- name: Check semver
2023-01-03 20:17:02 +01:00
uses: obi1kenobi/cargo-semver-checks-action@v2
2022-08-02 20:41:03 +02:00
- name: Publish to crates.io
run: # your `cargo publish` code here
```
2022-12-31 14:44:23 +01:00
# Input options
Every argument is optional.
| Input | Description | Default |
|--------------------|-----------------------------------------------------------------------------------------------------------------------------------|---------|
2023-01-03 20:17:02 +01:00
| crate-name | The crate whose API to check for semver. If not set, all crates in the workspace are processed. | |
2023-01-03 20:39:25 +01:00
| manifest-path | Path to Cargo.toml of crate or workspace to check. Has an effect only if `crate-name` is not specified. | |
2023-01-03 20:49:57 +01:00
| verbose | Enables verbose output of `cargo-semver-checks`. | `false` |
2022-12-31 14:44:23 +01:00
# Scenarios
- [Use in workspaces with more than one crate](#use-in-workspaces-with-more-than-one-crate)
## 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 `crate-name` or `manifest-path`.
2023-01-03 20:19:57 +01:00
For example, this will check `my-crate`:
```yaml
2022-08-02 20:41:03 +02:00
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v1
with:
crate-name: my-crate
- name: Publish my-crate to crates.io
run: # your `cargo publish` code here
```