Rename crate-name to package

This commit is contained in:
Mieszko Grodzicki 2023-02-22 19:43:43 +01:00 committed by Predrag Gruevski
parent 2b57dfc438
commit b4b317a6f3
4 changed files with 10 additions and 10 deletions

View file

@ -14,8 +14,8 @@ Every argument is optional.
| Input | Description | Default | | Input | Description | Default |
|--------------------|-----------------------------------------------------------------------------------------------------------------------------------|---------| |--------------------|-----------------------------------------------------------------------------------------------------------------------------------|---------|
| crate-name | The crate whose API to check for semver. If not set, all crates in the workspace are processed. | | | 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 `crate-name` is not specified. | | | 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` | | verbose | Enables verbose output of `cargo-semver-checks`. | `false` |
# Scenarios # Scenarios
@ -24,14 +24,14 @@ Every argument is optional.
## 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`. 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`: For example, this will check `my-crate`:
```yaml ```yaml
- name: Check semver - name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v1 uses: obi1kenobi/cargo-semver-checks-action@v2
with: with:
crate-name: my-crate package: my-crate
- name: Publish my-crate to crates.io - name: Publish my-crate to crates.io
run: # your `cargo publish` code here run: # your `cargo publish` code here
``` ```

View file

@ -4,12 +4,12 @@ branding:
icon: 'check-circle' icon: 'check-circle'
color: 'green' color: 'green'
inputs: inputs:
crate-name: package:
description: 'The crate whose API to check for semver. If not set, all crates in the workspace are processed.' 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 required: false
default: '' default: ''
manifest-path: 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 required: false
default: '' default: ''
verbose: verbose:

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View file

@ -27,7 +27,7 @@ function optionIfValueProvided(option: string, value?: string): string {
function getCheckReleaseArguments(): string[] { function getCheckReleaseArguments(): string[] {
return [ return [
optionIfValueProvided("--package", rustCore.input.getInput("crate-name")), optionIfValueProvided("--package", rustCore.input.getInput("package")),
optionIfValueProvided("--manifest-path", rustCore.input.getInput("manifest-path")), optionIfValueProvided("--manifest-path", rustCore.input.getInput("manifest-path")),
rustCore.input.getInputBool("verbose") ? " --verbose" : "", rustCore.input.getInputBool("verbose") ? " --verbose" : "",
].filter((el) => el != ""); ].filter((el) => el != "");