diff --git a/.forgejo/workflows/build-installers.yml b/.forgejo/workflows/build-installers.yml new file mode 100644 index 0000000..2c8d973 --- /dev/null +++ b/.forgejo/workflows/build-installers.yml @@ -0,0 +1,44 @@ +name: Build Kaleido Desktop installers +# Started by hand (Actions, then this workflow, then Run). Each platform needs a runner +# with its label; without one the job would wait indefinitely, so this never runs on +# push. Releases can instead be built with scripts/build.ps1 and published with +# scripts/publish-release.mjs. +on: + workflow_dispatch: + +jobs: + build: + 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/ diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index 68b3941..845ed49 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -1,4 +1,4 @@ -name: Validate and publish Kaleido Desktop +name: Validate Kaleido Desktop on: push: branches: [main] @@ -28,44 +28,3 @@ jobs: 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/ diff --git a/docs/development.md b/docs/development.md index 93381a8..dc3d3aa 100644 --- a/docs/development.md +++ b/docs/development.md @@ -48,5 +48,6 @@ for that file. For macOS and Linux, build on those systems (`scripts/fetch-libmpv.sh`, then `npx tauri build`) and merge their bundles into the same feed with `KALEIDO_BUNDLES`. -CI (`.forgejo/workflows/release.yml`) validates every push and builds installers for -tags on runners for each enabled platform. +CI (`.forgejo/workflows/release.yml`) validates every push and tag. Installers are +built locally; `.forgejo/workflows/build-installers.yml` can build them in CI once +runners exist for each platform, and only runs when started by hand.