name: Validate and publish Kaleido Desktop on: push: branches: [main] tags: ['v*'] workflow_dispatch: jobs: # Shared code: typecheck and unit tests for the interface, and a Linux # compile of the Rust core (keeps the cross-platform build honest). validate: runs-on: ubuntu-latest container: image: node:22-bookworm timeout-minutes: 40 steps: - uses: https://data.forgejo.org/actions/checkout@v4.4.0 - name: Interface run: | npm ci npm run typecheck npm test - name: Rust core (Linux) run: | set -eu apt-get update apt-get install -y --no-install-recommends curl build-essential pkg-config libwebkit2gtk-4.1-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev libmpv-dev libdbus-1-dev curl -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal . "$HOME/.cargo/env" mkdir -p dist && cargo check --manifest-path src-tauri/Cargo.toml # Signed installers per platform for version tags. Each OS needs a runner with # its label; set the repository variable DESKTOP_RUNNERS=true once they exist. # Until then, build with scripts/build.ps1 and attach the files to the release. build: if: startsWith(github.ref, 'refs/tags/v') && vars.DESKTOP_RUNNERS == 'true' needs: validate strategy: fail-fast: false matrix: include: - os: windows runner: windows-latest # - os: macos # runner: macos-latest # - os: linux # runner: ubuntu-latest runs-on: ${{ matrix.runner }} timeout-minutes: 90 steps: - uses: https://data.forgejo.org/actions/checkout@v4.4.0 - name: Build (Windows) if: matrix.os == 'windows' shell: pwsh env: TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} run: ./scripts/build.ps1 - name: Build (macOS / Linux) if: matrix.os != 'windows' env: TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} run: | sh scripts/fetch-libmpv.sh npm ci npx tauri build - uses: https://data.forgejo.org/actions/upload-artifact@v4 with: name: kaleido-${{ matrix.os }} path: src-tauri/target/release/bundle/