Skip to content

publish

publish #22

Workflow file for this run

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 }}