Build Desktop App #438
Workflow file for this run
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: Build Desktop App | |
| concurrency: | |
| group: Build-Desktop-App-${{ github.workflow }}-${{ github.head_ref || github.event.workflow_run.head_branch || github.run_id }} | |
| cancel-in-progress: true | |
| on: | |
| merge_group: | |
| pull_request: | |
| branches: | |
| - main | |
| - "release/**" | |
| paths: | |
| - "desktop/**" | |
| - ".github/workflows/pr-desktop-build.yml" | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-desktop: | |
| name: Build Desktop (${{ matrix.platform }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: linux | |
| os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| args: "--bundles deb,rpm" | |
| # TODO: Fix and enable the macOS build. | |
| #- platform: macos | |
| # os: macos-latest | |
| # target: universal-apple-darwin | |
| # args: "--target universal-apple-darwin" | |
| # TODO: Fix and enable the Windows build. | |
| #- platform: windows | |
| # os: windows-latest | |
| # target: x86_64-pc-windows-msvc | |
| # args: "" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| with: | |
| persist-credentials: false | |
| - name: Setup node | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 | |
| with: | |
| node-version: 24 | |
| cache: "npm" # zizmor: ignore[cache-poisoning] | |
| cache-dependency-path: ./desktop/package-lock.json | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 | |
| with: | |
| toolchain: stable | |
| targets: ${{ matrix.target }} | |
| - name: Cache Cargo registry and build | |
| uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # zizmor: ignore[cache-poisoning] | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| desktop/src-tauri/target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('desktop/src-tauri/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Install Linux dependencies | |
| if: matrix.platform == 'linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| libglib2.0-dev \ | |
| libgirepository1.0-dev \ | |
| libgtk-3-dev \ | |
| libjavascriptcoregtk-4.1-dev \ | |
| libwebkit2gtk-4.1-dev \ | |
| libayatana-appindicator3-dev \ | |
| gobject-introspection \ | |
| pkg-config \ | |
| curl \ | |
| xdg-utils | |
| - name: Install npm dependencies | |
| working-directory: ./desktop | |
| run: npm ci | |
| - name: Build desktop app | |
| working-directory: ./desktop | |
| run: npx tauri build ${{ matrix.args }} | |
| env: | |
| TAURI_SIGNING_PRIVATE_KEY: "" | |
| TAURI_SIGNING_PRIVATE_KEY_PASSWORD: "" | |
| - name: Upload build artifacts | |
| if: always() | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f | |
| with: | |
| name: desktop-build-${{ matrix.platform }}-${{ github.run_id }} | |
| path: | | |
| desktop/src-tauri/target/release/bundle/ | |
| retention-days: 7 | |
| if-no-files-found: ignore |