Skip to content

ci: Use v2 to release #74

ci: Use v2 to release

ci: Use v2 to release #74

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
tags:
- 'v*'
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: |
cargo clippy --no-deps --all-features
cargo build --all-targets --all-features --verbose
- name: Run tests
run: cargo test --verbose --all-features
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v2
upload:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}