Skip to content

v1.0.2

v1.0.2 #11

Workflow file for this run

name: "Publish"
on:
release:
types: [published]
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run cargo check
run: cargo check
test:
name: Test Suite
runs-on: ubuntu-latest
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- x86-unknown-linux-gnu
- thumbv6m-none-eabi
- thumbv7m-none-eabi
- thumbv7em-none-eabi
- thumbv7em-none-eabihf
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run cargo test
run: cargo test
- name: Run cargo test with all features
run: cargo test --all-features
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run cargo clippy
run: cargo clippy -- -D warnings
publish:
name: crates.io release
if: startsWith(github.ref, 'refs/tags/v')
needs: [check, test, lints]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: get_version
uses: battila7/get-version-action@v2
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-workspaces
run: cargo install cargo-workspaces
- name: Publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
VERSION: ${{ steps.get_version.outputs.version-without-v }}
shell: bash
run: |
git config --global user.email "runner@gha.local"
git config --global user.name "Github Action"
cargo workspaces publish --yes --force '*' --exact --no-git-commit --allow-dirty --skip-published custom $VERSION