Skip to content

fix: migrate the new release plz gh action #408

fix: migrate the new release plz gh action

fix: migrate the new release plz gh action #408

Workflow file for this run

## references:
# cache: https://github.com/actions/cache/blob/main/examples.md#rust---cargo
# audit: https://github.com/actions-rs/audit-check
# "needs": https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idneeds
name: Build
on:
push:
branches: ["*"]
paths-ignore:
- "**/docs/**"
- "**.md"
pull_request:
branches: [main]
paths-ignore:
- "**/docs/**"
- "**.md"
workflow_call:
jobs:
check:
name: check
strategy:
fail-fast: false
matrix:
version: ["macos-latest", "ubuntu-latest"]
runs-on: ${{ matrix.version }}
steps:
- uses: actions/checkout@v4
- name: setup | rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
default: true
profile: minimal
components: clippy, rustfmt
- run: cargo check
lint:
name: lint
strategy:
fail-fast: false
matrix:
version: ["macos-latest", "ubuntu-latest"]
cargo-cmd:
- fmt --all -- --check
- clippy --all-_targets --all-features -- -D warnings
runs-on: ${{ matrix.version }}
steps:
- uses: actions/checkout@v4
- name: setup | rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
default: true
profile: minimal
components: clippy, rustfmt
- run: cargo ${{ matrix['cargo-cmd'] }}
tests:
name: test
strategy:
fail-fast: false
matrix:
version: ["macos-latest", "ubuntu-latest"]
rust: [nightly, stable]
runs-on: ${{ matrix.version }}
continue-on-error: ${{ matrix.rust == 'nightly' }}
steps:
- uses: actions/checkout@v4
- name: setup | rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
default: true
profile: minimal
- if: ${{ matrix.version == 'ubuntu-latest' }}
name: install libX11-devel for libX11
run: |
sudo apt-get update
sudo apt-get install -y libx11-dev
- name: cargo test
run: cargo test --all --locked
pkg-deb:
name: binary package .deb
needs: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: build .deb file
uses: sassman/rust-deb-builder@v1
- name: Archive deb artifact
uses: actions/upload-artifact@v4
with:
name: t-rec-amd64-static.deb
path: _target/x86_64-unknown-linux-musl/debian/t-rec*.deb
audit:
name: security audit
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: setup | rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
default: true
profile: minimal
- name: audit
uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
  NODES
COMMUNITY 1
Project 3
USERS 1