Flatpak CI #20
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: Flatpak CI | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build-flatpak: | |
| name: Build Flatpak Bundle (${{ matrix.arch }}) | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| matrix: | |
| include: | |
| - arch: amd64 | |
| runner: ubuntu-latest | |
| - arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Flatpak and flatpak-builder | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y flatpak flatpak-builder | |
| - name: Add Flathub repository | |
| run: | | |
| sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo | |
| - name: Install Flatpak SDK and runtime | |
| run: | | |
| sudo flatpak install -y flathub org.kde.Platform//6.10 org.kde.Sdk//6.10 | |
| sudo flatpak install -y flathub io.qt.qtwebengine.BaseApp//6.10 | |
| sudo flatpak install -y flathub org.freedesktop.Sdk.Extension.freepascal//25.08 | |
| - name: Build Flatpak | |
| run: | | |
| flatpak-builder \ | |
| --force-clean \ | |
| --repo=flatpak-repo \ | |
| --disable-rofiles-fuse \ | |
| --ccache \ | |
| --state-dir=.flatpak-builder \ | |
| flatpak-build \ | |
| io.github.benjamimgois.goverlay.yml | |
| - name: Create Flatpak bundle | |
| run: | | |
| flatpak build-bundle \ | |
| flatpak-repo \ | |
| goverlay-${{ github.ref_name }}-${{ matrix.arch }}.flatpak \ | |
| io.github.benjamimgois.goverlay | |
| - name: Get bundle info | |
| id: bundle_info | |
| run: | | |
| BUNDLE_SIZE=$(du -h goverlay-${{ github.ref_name }}-${{ matrix.arch }}.flatpak | cut -f1) | |
| echo "size=$BUNDLE_SIZE" >> $GITHUB_OUTPUT | |
| echo "filename=goverlay-${{ github.ref_name }}-${{ matrix.arch }}.flatpak" >> $GITHUB_OUTPUT | |
| - name: Upload bundle as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: flatpak-bundle-${{ matrix.arch }} | |
| path: goverlay-${{ github.ref_name }}-${{ matrix.arch }}.flatpak | |
| retention-days: 90 |