Files
Notify/.gitea/workflows/build-flatpak.yml
Colin Powell 44f133aac0
Some checks failed
Build Flatpak / Build Flatpak (push) Failing after 8m48s
[ci] Still trying to get CI working
2026-03-20 13:37:45 -04:00

60 lines
1.9 KiB
YAML

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('build-aux/com.ranfdev.Notify.Devel.json') }}
- 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: |
rm -rf .flatpak-builder build-dir repo
flatpak-builder --force-clean --user --install-deps-from=flathub --repo=repo build-dir build-aux/com.ranfdev.Notify.Devel.json
- name: Build Bundle
run: |
# Create a single .flatpak file for distribution
flatpak build-bundle repo my-app.flatpak com.ranfdev.Notify.Devel
- 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