Update dependencies #184
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" ] | |
tags: | |
- "*" | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
name: Build & Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose | |
publish: | |
name: Publish Library | |
runs-on: ubuntu-latest | |
needs: [build] | |
if: github.ref_type == 'tag' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: Publish | |
env: | |
TOKEN: ${{ secrets.CRATES_IO_TOKEN }} | |
run: | | |
cargo login $TOKEN | |
cargo publish |