mirror of
https://github.com/obi1kenobi/cargo-semver-checks-action.git
synced 2024-11-21 23:49:33 +01:00
Rename crate-name to package
This commit is contained in:
parent
2b57dfc438
commit
b4b317a6f3
4 changed files with 10 additions and 10 deletions
10
README.md
10
README.md
|
@ -14,8 +14,8 @@ 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. | |
|
||||
| manifest-path | Path to Cargo.toml of crate or workspace to check. Has an effect only if `crate-name` is not specified. | |
|
||||
| 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
|
||||
|
@ -24,14 +24,14 @@ Every argument is optional.
|
|||
|
||||
## 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`.
|
||||
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`:
|
||||
```yaml
|
||||
- name: Check semver
|
||||
uses: obi1kenobi/cargo-semver-checks-action@v1
|
||||
uses: obi1kenobi/cargo-semver-checks-action@v2
|
||||
with:
|
||||
crate-name: my-crate
|
||||
package: my-crate
|
||||
- name: Publish my-crate to crates.io
|
||||
run: # your `cargo publish` code here
|
||||
```
|
||||
|
|
|
@ -4,12 +4,12 @@ branding:
|
|||
icon: 'check-circle'
|
||||
color: 'green'
|
||||
inputs:
|
||||
crate-name:
|
||||
description: 'The crate whose API to check for semver. If not set, all crates in the workspace are processed.'
|
||||
package:
|
||||
description: '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.'
|
||||
required: false
|
||||
default: ''
|
||||
manifest-path:
|
||||
description: 'Path to Cargo.toml of crate or workspace to check. Has an effect only if crate-name is not specified.'
|
||||
description: 'Path to Cargo.toml of crate or workspace to check. Has an effect only if package is not specified.'
|
||||
required: false
|
||||
default: ''
|
||||
verbose:
|
||||
|
|
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
|
@ -27,7 +27,7 @@ function optionIfValueProvided(option: string, value?: string): string {
|
|||
|
||||
function getCheckReleaseArguments(): string[] {
|
||||
return [
|
||||
optionIfValueProvided("--package", rustCore.input.getInput("crate-name")),
|
||||
optionIfValueProvided("--package", rustCore.input.getInput("package")),
|
||||
optionIfValueProvided("--manifest-path", rustCore.input.getInput("manifest-path")),
|
||||
rustCore.input.getInputBool("verbose") ? " --verbose" : "",
|
||||
].filter((el) => el != "");
|
||||
|
|
Loading…
Reference in a new issue