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.