Skip to content

chore: appease clippy #31

chore: appease clippy

chore: appease clippy #31

Workflow file for this run

name: Release (portable)
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write # needed to create/attach GitHub Releases
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# 1) Run tests first; release will wait for this to succeed
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin
~/.cargo/registry
~/.cargo/git
target
key: test-${{ runner.os }}-${{ hashFiles('**/Cargo.lock','**/Cargo.toml') }}
# Fast headless tests (skip UI deps)
- name: Test (no-default-features)
env:
RUST_BACKTRACE: 1
run: cargo test --all --release --no-default-features
# Make sure the UI build path still compiles
- name: Compile check (ui feature)
run: cargo build --release --features ui,tokens
# 2) Only if tests succeed, build & publish artifacts per-OS
release:
needs: test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
label: linux
cmd: just tgz
glob: dist/*.tar.gz
- os: windows-latest
label: windows
cmd: just exe
glob: dist/*.zip
- os: macos-latest
label: macos
cmd: just dmg
glob: dist/*.dmg
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin
~/.cargo/registry
~/.cargo/git
target
key: release-${{ runner.os }}-${{ hashFiles('**/Cargo.lock','**/Cargo.toml') }}
- name: Install just
run: cargo install just --locked || true
shell: bash
# Build & package via the per-OS just recipe
- name: Build package (${{ matrix.label }})
run: ${{ matrix.cmd }}
shell: bash
- name: Upload artifact (CI run)
uses: actions/upload-artifact@v4
with:
name: stitch-${{ matrix.label }}
path: ${{ matrix.glob }}
- name: Attach files to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: ${{ matrix.glob }}