diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 3e0a0be24678a6c01533a295c724191e969ec40e..c6d14a06cde515ac0a8965d14938142270f5e16f 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -5,7 +5,9 @@ on: # Runs on pushes targeting the default branch push: branches: ["master"] - + # ALSO run when a new GitHub Release is published + release: + types: [published] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -31,13 +33,27 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 + + - name: Install Flatpak Builder + run: | + sudo apt-get update + sudo apt-get install -y flatpak flatpak-builder + flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo + + - name: Build Flatpak Repo + run: | + flatpak-builder --user --install-deps-from=flathub --repo=public/repo --force-clean build-dir com.floatpane.matcha.yaml + flatpak build-update-repo --generate-static-deltas public/repo + - name: Setup Pages uses: actions/configure-pages@v5 + - name: Upload artifact uses: actions/upload-pages-artifact@v4 with: # Upload entire repository - path: 'public' + path: "public" + - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 diff --git a/com.floatpane.matcha.yaml b/com.floatpane.matcha.yaml new file mode 100644 index 0000000000000000000000000000000000000000..027c0af9da609e7f71666e6d5545d22391fe6a83 --- /dev/null +++ b/com.floatpane.matcha.yaml @@ -0,0 +1,32 @@ +id: com.floatpane.matcha +runtime: org.freedesktop.Sdk +runtime-version: "23.08" +sdk: org.freedesktop.Sdk +sdk-extensions: + - org.freedesktop.Sdk.Extension.golang + +command: matcha +finish-args: + - --share=network + - --share=ipc + - --device=dri + - --filesystem=home + +modules: + - name: matcha + buildsystem: simple + build-options: + append-path: /usr/lib/sdk/golang/bin + env: + GOCACHE: /app/.cache/go-build + GOPATH: /app/.go + build-args: + - --share=network + build-commands: + - go build -o /app/bin/matcha . + - chmod -R u+w /app/.go /app/.cache + - rm -rf /app/.go /app/.cache + + sources: + - type: dir + path: . diff --git a/public/matcha.flatpakref b/public/matcha.flatpakref new file mode 100644 index 0000000000000000000000000000000000000000..c9ba36f73f38a0f3d94dafa1ef0fffd768f7bb64 --- /dev/null +++ b/public/matcha.flatpakref @@ -0,0 +1,7 @@ +[Flatpak Ref] +Name=com.floatpane.matcha +Branch=master +Title=Matcha +IsRuntime=False +Url=https://matcha.floatpane.com/repo/ +SuggestRemoteName=matcha