fix(screen-mirror): grant display-capture permission + Flatpak pipeline #7
Workflow file for this run
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 | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches-ignore: | |
| - main | |
| - master | |
| paths: | |
| - "electron/**" | |
| - "flatpak/**" | |
| - "package.json" | |
| - "package-lock.json" | |
| - "vite.config.ts" | |
| - ".github/workflows/flatpak.yml" | |
| pull_request: | |
| paths: | |
| - "src/**" | |
| - "public/**" | |
| - "electron/**" | |
| - "flatpak/**" | |
| - "package.json" | |
| - "package-lock.json" | |
| - "vite.config.ts" | |
| - ".github/workflows/flatpak.yml" | |
| jobs: | |
| flatpak: | |
| name: Build Flatpak | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: "npm" | |
| # Install flatpak-node-generator from a pinned commit for reproducibility. | |
| # The tool is a Python package (not a single script); pinning to an exact | |
| # commit SHA prevents supply-chain surprises from upstream changes. | |
| # To update: bump the commit SHA below to the desired upstream commit. | |
| - name: Install flatpak-node-generator | |
| run: | | |
| pip3 install --quiet \ | |
| "git+https://github.com/flatpak/flatpak-builder-tools.git@5de461271d05f43f267b954ac6010b410378ae47#subdirectory=node" | |
| - name: Generate offline npm sources | |
| run: | | |
| flatpak-node-generator npm package-lock.json \ | |
| -o flatpak/generated-sources.json | |
| - name: Install Flatpak and flatpak-builder | |
| run: | | |
| sudo apt-get update -y | |
| sudo apt-get install -y flatpak flatpak-builder | |
| - name: Add Flathub remote | |
| run: | | |
| flatpak remote-add --user --if-not-exists flathub \ | |
| https://dl.flathub.org/repo/flathub.flatpakrepo | |
| - name: Install Flatpak runtimes and SDK extensions | |
| run: | | |
| flatpak install --user -y flathub \ | |
| org.freedesktop.Platform//24.08 \ | |
| org.freedesktop.Sdk//24.08 \ | |
| org.electronjs.Electron2.BaseApp//24.08 \ | |
| org.freedesktop.Sdk.Extension.node20//24.08 | |
| - name: Build Flatpak bundle | |
| run: | | |
| flatpak-builder --user --install-deps-from=flathub \ | |
| --force-clean --repo=flatpak-repo \ | |
| flatpak-build flatpak/com.rein.app.yml | |
| - name: Create .flatpak bundle file | |
| run: | | |
| flatpak build-bundle flatpak-repo rein.flatpak com.rein.app | |
| - name: Upload Flatpak artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rein-flatpak | |
| path: rein.flatpak | |
| retention-days: 7 |