Skip to content

fix: cut v1.0.6 for macOS release signing #38

fix: cut v1.0.6 for macOS release signing

fix: cut v1.0.6 for macOS release signing #38

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
changes:
name: Detect changed files
runs-on: ubuntu-22.04
outputs:
run_full_ci: ${{ steps.filter.outputs.run_full_ci }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Detect code changes
id: filter
uses: dorny/paths-filter@v3
with:
filters: |
run_full_ci:
- '**'
- '!**/*.md'
- '!LICENSE'
test:
name: Test
needs: changes
if: needs.changes.outputs.run_full_ci == 'true'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Run Rust tests
run: cargo test --verbose
- name: Check Rust formatting
run: cargo fmt --check
- name: Run Clippy
run: cargo clippy -- -D warnings
test-frontend:
name: Test Frontend
needs: changes
if: needs.changes.outputs.run_full_ci == 'true'
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
working-directory: frontend
run: npm ci
- name: Build frontend
working-directory: frontend
run: npm run build
build-tauri:
name: Build Tauri
needs: [changes, test, test-frontend]
if: needs.changes.outputs.run_full_ci == 'true'
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
- os: macos-latest
target: aarch64-apple-darwin
- os: macos-latest
target: x86_64-apple-darwin
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install dependencies (Ubuntu)
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install frontend dependencies
working-directory: frontend
run: npm ci
- name: Build frontend
working-directory: frontend
run: npm run build
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
. -> target
src-tauri -> src-tauri/target
key: tauri-${{ matrix.os }}-${{ matrix.target }}
- name: Install Tauri CLI
run: cargo install tauri-cli --locked --version "^2" --force
- name: Build Tauri app
working-directory: src-tauri
run: cargo tauri build --target ${{ matrix.target }}
- name: Upload artifacts (Linux)
if: matrix.os == 'ubuntu-22.04'
uses: actions/upload-artifact@v4
with:
name: csv-align-linux-x86_64
path: |
src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/*.deb
src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage
retention-days: 7
- name: Upload artifacts (macOS ARM)
if: matrix.os == 'macos-latest' && matrix.target == 'aarch64-apple-darwin'
uses: actions/upload-artifact@v4
with:
name: csv-align-macos-arm64
path: src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg
retention-days: 7
- name: Upload artifacts (macOS Intel)
if: matrix.os == 'macos-latest' && matrix.target == 'x86_64-apple-darwin'
uses: actions/upload-artifact@v4
with:
name: csv-align-macos-x86_64
path: src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg
retention-days: 7