Publish #4
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: | |
jobs: | |
publish: | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
toolchain: [ stable ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- name: Set up Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install Cargo:semver | |
run: cargo install cargo-semver-checks --locked | |
- name: Run Cargo:semver | |
run: cargo semver-checks check-release | |
- name: Publish to crates.io | |
run: cargo publish --token ${CRATES_TOKEN} | |
env: | |
CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |