ci: cross-platform release workflow (macOS/Linux/Windows) on tag #7
This file contains hidden or 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
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| frontend: | |
| name: Frontend (check · test) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm check | |
| - run: pnpm test | |
| - run: pnpm build | |
| rust: | |
| name: Rust (build · test) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Tauri v2 Linux system dependencies. | |
| - name: Install Tauri system deps | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev \ | |
| libayatana-appindicator3-dev librsvg2-dev libxdo-dev \ | |
| build-essential file libssl-dev | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri | |
| # generate_context!() embeds the frontend, so build it before compiling Rust. | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm build | |
| # tauri-build validates externalBin exists; the real sidecar needs the | |
| # JuCode-CLI checkout, so stub it for the compile/test (it isn't executed). | |
| - name: Stub engine sidecar | |
| run: | | |
| mkdir -p src-tauri/binaries | |
| printf '#!/bin/sh\nexit 0\n' > src-tauri/binaries/jucode-x86_64-unknown-linux-gnu | |
| chmod +x src-tauri/binaries/jucode-x86_64-unknown-linux-gnu | |
| - run: cargo test --manifest-path src-tauri/Cargo.toml | |
| - run: cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings |