publish #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish | |
on: | |
workflow_dispatch: | |
inputs: | |
tag-increment: | |
description: increment version tag | |
default: patch | |
required: true | |
type: choice | |
options: | |
- patch | |
- minor | |
- major | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
# repo write permission for pushing tags | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt,clippy | |
- run: cargo fmt --all -- --check | |
- run: cargo clippy -- -W clippy::pedantic | |
- run: cargo test -- --test-threads=1 | |
- run: cargo install cargo-bump | |
- run: cargo bump -g ${{ inputs.tag-increment }} | |
- run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
git commit -m "github-actions version bump" | |
git push && git push --tags | |
- run: cargo publish --token ${{ secrets.CARGO_TOKEN }} |