Release 0.6.1 #215
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
name: Rust | |
on: | |
push: | |
branches: [ main, develop ] | |
pull_request: | |
branches: [ main, develop ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/registry | |
key: '${{ runner.os }}-cargo-registry-${{ hashFiles(''**/Cargo.lock'') }}' | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/git | |
key: '${{ runner.os }}-cargo-index-${{ hashFiles(''**/Cargo.lock'') }}' | |
- uses: actions/cache@v3 | |
with: | |
path: target | |
key: '${{ runner.os }}-cargo-build-target-${{ hashFiles(''**/Cargo.lock'') }}' | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/registry | |
key: '${{ runner.os }}-cargo-registry-${{ hashFiles(''**/Cargo.lock'') }}' | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/git | |
key: '${{ runner.os }}-cargo-index-${{ hashFiles(''**/Cargo.lock'') }}' | |
- uses: actions/cache@v3 | |
with: | |
path: target | |
key: '${{ runner.os }}-cargo-build-target-${{ hashFiles(''**/Cargo.lock'') }}' | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: '--all --check' | |
test: | |
runs-on: ubuntu-latest | |
needs: [clippy, fmt] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/registry | |
key: '${{ runner.os }}-cargo-registry-${{ hashFiles(''**/Cargo.lock'') }}' | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/git | |
key: '${{ runner.os }}-cargo-index-${{ hashFiles(''**/Cargo.lock'') }}' | |
- uses: actions/cache@v3 | |
with: | |
path: target | |
key: '${{ runner.os }}-cargo-build-target-${{ hashFiles(''**/Cargo.lock'') }}' | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
deploy: | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.ref_name == 'main' && github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/registry | |
key: '${{ runner.os }}-cargo-registry-${{ hashFiles(''**/Cargo.lock'') }}' | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/git | |
key: '${{ runner.os }}-cargo-index-${{ hashFiles(''**/Cargo.lock'') }}' | |
- uses: actions/cache@v3 | |
with: | |
path: target | |
key: '${{ runner.os }}-cargo-build-target-${{ hashFiles(''**/Cargo.lock'') }}' | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: package | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: publish | |
args: --token ${{ secrets.CRATES_TOKEN }} |