0.1.6 #6
Workflow file for this run
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
--- | |
on: | |
push: | |
tags: | |
- '*' | |
workflow_dispatch: | |
name: Publish Crate | |
jobs: | |
test: | |
name: Cargo Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy, rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- uses: taiki-e/install-action@cargo-deny | |
- name: Scan for vulnerabilities | |
run: cargo deny check advisories | |
- name: Run cargo fmt | |
run: cargo fmt --check | |
- name: Run cargo clippy | |
run: cargo clippy -- -D warnings | |
- name: Run cargo test | |
run: cargo test | |
publish: | |
needs: | |
- test | |
name: Publish Crate to crates.io | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- run: cargo publish --token ${CRATES_IO_TOKEN} | |
env: | |
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} | |
... |