From 1569955e1255fefa1f0640720193bbe81e3f3314 Mon Sep 17 00:00:00 2001 From: Tarasov Aleksandr <55220741+arabianq@users.noreply.github.com> Date: Sat, 25 Apr 2026 16:38:34 +0300 Subject: [PATCH] chore(ci): Add flatter to host Flatpak repo on GitHub Pages (#76) * chore(ci): Add flatter to host Flatpak repo on GitHub Pages - Update release.yml to not upload .flatpak file to releases - Create flatter.yml to automate building and hosting of Flatpak via GitHub pages using andyholmes/flatter - Add nightly branch for main pushes and stable branch for releases - Update README.md with the new Flatpak installation instructions Co-authored-by: arabianq <55220741+arabianq@users.noreply.github.com> * Potential fix for pull request finding 'CodeQL / Workflow does not contain permissions' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .github/workflows/flatter.yml | 66 +++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 7 ---- README.md | 22 ++++++++++++ 3 files changed, 88 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/flatter.yml diff --git a/.github/workflows/flatter.yml b/.github/workflows/flatter.yml new file mode 100644 index 0000000..23271e2 --- /dev/null +++ b/.github/workflows/flatter.yml @@ -0,0 +1,66 @@ +name: Flatter + +on: + push: + branches: [main, master] + release: + types: [published] + workflow_dispatch: + +jobs: + flatter: + name: Flatter + runs-on: ubuntu-latest + permissions: + contents: read + container: + image: ghcr.io/andyholmes/flatter/freedesktop:24.08 + options: --privileged + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup GPG + id: gpg + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.GPG_PASSPHRASE }} + + - name: Set Default Branch + id: set_branch + run: | + if [ "${{ github.event_name }}" == "release" ]; then + echo "branch=stable" >> $GITHUB_OUTPUT + else + echo "branch=nightly" >> $GITHUB_OUTPUT + fi + + - name: Modify Manifest + run: | + echo "default-branch: ${{ steps.set_branch.outputs.branch }}" >> packages/flatpak/ru.arabianq.pwsp.yaml + + - name: Build Flatpak + uses: andyholmes/flatter@main + with: + files: packages/flatpak/ru.arabianq.pwsp.yaml + gpg-sign: ${{ steps.gpg.outputs.fingerprint }} + upload-bundles: false + upload-pages-artifact: true + + deploy: + name: Deploy to GitHub Pages + runs-on: ubuntu-latest + needs: flatter + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 68f6d74..45d0b82 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -174,10 +174,3 @@ jobs: cache: true branch: master build-bundle: true - - - name: Upload Flatpak to release - uses: softprops/action-gh-release@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - tag_name: ${{ needs.prepare.outputs.tag }} - files: ru.arabianq.pwsp.flatpak diff --git a/README.md b/README.md index 54373cd..4882586 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,28 @@ three main components: You can download pre-built binaries and .deb packages from the [releases page](https://github.com/arabianq/pipewire-soundpad/releases). +## **Flatpak** + +You can install PWSP via Flatpak from our custom repository hosted on GitHub Pages. + +Add the repository: + +```bash +flatpak remote-add --user --if-not-exists arabianq-repo https://arabianq.github.io/pipewire-soundpad/index.flatpakrepo +``` + +Install the stable version: + +```bash +flatpak install --user arabianq-repo ru.arabianq.pwsp//stable +``` + +Or install the nightly version (latest commit to `main`): + +```bash +flatpak install --user arabianq-repo ru.arabianq.pwsp//nightly +``` + ## **Fedora Linux (and derivatives)** If you're using Fedora, you can install PWSP from a dedicated repository using DNF.