diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8a0cfd6..e679da2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,56 @@ on: - v* jobs: + + flatpak: + name: Flatpak Build + runs-on: ubuntu-latest + needs: [cachedeps] + + container: + image: bilelmoussaoui/flatpak-github-actions:gnome-45 + options: --privileged + + steps: + - name: Checkout Git repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: actions/download-artifact@master + with: + name: flatpak-sources + path: flatpak/ + + - name: Install Node.js, NPM and Yarn + uses: actions/setup-node@v4.0.2 + with: + node-version: 18 + + - name: Set up flatpak build cache + uses: actions/cache@v4 + continue-on-error: false + with: + path: | + build/ + .flatpak-builder/ + flatpak-node/ + key: ${{ runner.os }}-${{ runner.arch }}-flatpak-builder-${{ hashFiles('flatpak/*') }} + restore-keys: ${{ runner.os }}-${{ runner.arch }}-flatpak-builder- + + - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 + with: + bundle: XStreaming.flatpak + manifest-path: flatpak/io.github.Geocld.XStreaming.yml + cache-key: flatpak-builder-${{ github.sha }} + + - name: Release flatpak + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/v') + with: + files: XStreaming.flatpak + draft: true + release: name: Build/release Electron app runs-on: ${{ matrix.os }}