diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml index 28b7526..44843b5 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/flatpak.yml @@ -24,6 +24,8 @@ concurrency: jobs: build: name: Build Flatpak (${{ matrix.arch }}) + # PRs: x86_64 only. main / workflow_dispatch: both arches. + if: matrix.arch == 'x86_64' || github.event_name != 'pull_request' runs-on: ${{ matrix.runner }} strategy: fail-fast: false @@ -45,15 +47,12 @@ jobs: with: bundle: vocalinux-${{ matrix.arch }}.flatpak manifest-path: packaging/flatpak/com.vocalinux.Vocalinux.yml - cache-key: flatpak-${{ matrix.arch }}-${{ github.sha }} + # Stable key so .flatpak-builder cache restores across commits. + # github.sha in the key forced a full rebuild every run. + # Arch is appended automatically by the action. + cache-key: flatpak-builder-${{ hashFiles('packaging/flatpak/**') }} arch: ${{ matrix.arch }} + artifact-name: vocalinux-flatpak-${{ matrix.arch }} # Flathub mirrors screenshots at submission time; mirror locally so the # builddir linter does not flag the external screenshot URL. mirror-screenshots-url: https://dl.flathub.org/media - - - name: Upload bundle - uses: actions/upload-artifact@v4 - with: - name: vocalinux-flatpak-${{ matrix.arch }} - path: vocalinux-${{ matrix.arch }}.flatpak - if-no-files-found: error