mirror of
https://github.com/obi1kenobi/cargo-semver-checks-action.git
synced 2024-11-22 16:09:33 +01:00
Add more information to README.
This commit is contained in:
parent
29dd54c10c
commit
1bd4be9e75
1 changed files with 35 additions and 0 deletions
35
README.md
35
README.md
|
@ -1,2 +1,37 @@
|
|||
# cargo-semver-checks-action
|
||||
A GitHub Action for running cargo-semver-checks
|
||||
|
||||
By default, this action assumes that:
|
||||
- Your cargo workspace contains a single crate.
|
||||
- Your releases are tagged in git as `v{major}.{minor}.{patch}`, for example `v1.2.3`.
|
||||
|
||||
Single-crate workspaces can use it as:
|
||||
```
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Check semver
|
||||
uses: obi1kenobi/cargo-semver-checks-action@v1
|
||||
- name: Publish to crates.io
|
||||
run: # your `cargo publish` code here
|
||||
```
|
||||
|
||||
To use it in a workspace with more than one crate:
|
||||
- use the `crate-name` setting to specify which crate should be checked in a given run, and
|
||||
- use the `version-tag-prefix` setting to override the default prefix `v` to match the way the releases of your crate are tagged.
|
||||
|
||||
For example, this is publishing `my-crate` whose releases are tagged as `my-crate-v1.2.3`:
|
||||
```
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- 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
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue