fix publish build #10
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: | |
- "*" | |
name: Publish | |
jobs: | |
build_and_test_linux: | |
name: Build and Test (Linux) | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Install build dependencies | |
run: | | |
sudo apt-get update | |
sudo apt install libudev-dev | |
sudo apt install libasound2-dev | |
- uses: taiki-e/install-action@nextest | |
- name: "Build and test" | |
run: cargo nextest run --workspace --all-targets --all-features --no-tests | |
crates_io_publish: | |
name: Publish (crates.io) | |
needs: | |
- build_and_test_linux | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: cargo-release Cache | |
id: cargo_release_cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/bin/cargo-release | |
key: ${{ runner.os }}-cargo-release | |
- run: cargo install cargo-release | |
if: steps.cargo_release_cache.outputs.cache-hit != 'true' | |
- name: cargo login | |
run: cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
- name: "cargo release publish" | |
run: |- | |
cargo release \ | |
publish \ | |
--workspace \ | |
--all-features \ | |
--allow-branch HEAD \ | |
--no-confirm \ | |
--execute |