From f7cc61162fafe84330d1289db20e90671e38c577 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Fri, 20 Mar 2026 13:06:52 -0400 Subject: [PATCH] [ci] Add gitea workflows --- .gitea/workflows/build-flatpak.yml | 61 ++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .gitea/workflows/build-flatpak.yml diff --git a/.gitea/workflows/build-flatpak.yml b/.gitea/workflows/build-flatpak.yml new file mode 100644 index 0000000..1d2e5c4 --- /dev/null +++ b/.gitea/workflows/build-flatpak.yml @@ -0,0 +1,61 @@ +name: Build Flatpak + +on: + push: + branches: [ main ] + tags: [ '*' ] + pull_request: + branches: [ main ] + +jobs: + flatpak: + name: Build Flatpak + # Use a VM runner if possible. If using a docker runner, ensure it supports namespaces. + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Install Flatpak Tools + run: | + sudo apt-get update + sudo apt-get install -y flatpak flatpak-builder + # Initialize the user installation (safer for CI than system-wide) + flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo + + - name: Cache Flatpak Dependencies + uses: actions/cache@v4 + with: + path: ~/.local/share/flatpak + key: flatpak-${{ runner.os }}-${{ hashFiles('ink.unbl.Notify.yml') }} + + - name: Install Runtimes + run: | + # Extract runtime from your manifest to install it + # This assumes your manifest defines org.freedesktop.Platform/x86_64/23.08 + # You may need to hardcode this or parse your YAML + flatpak --user install -y flathub org.freedesktop.Platform//23.08 org.freedesktop.Sdk//23.08 + + - name: Build Flatpak + run: | + # --force-clean: Ensures a fresh build + # --install-deps-from=flathub: Automatically pulls needed libs + # --repo=repo: Creates a local repo directory for export + flatpak-builder --force-clean --user --install-deps-from=flathub --repo=repo build-dir ink.unbl.Notify.yml + + - name: Build Bundle + run: | + # Create a single .flatpak file for distribution + flatpak build-bundle repo my-app.flatpak ink.unbl.Notify + + - name: Validate AppStream + run: | + # Optional: Check metadata validity + flatpak run org.freedesktop.appstream-cli validate --nonet my-app.flatpak || true + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: flatpak-bundle + path: my-app.flatpak