ci: flatpak build

This commit is contained in:
edde746
2025-11-04 16:51:14 +01:00
parent 3d5c7f7e3b
commit aa1efdff64
4 changed files with 204 additions and 1 deletions
+50 -1
View File
@@ -379,8 +379,56 @@ jobs:
name: linux-app
path: plezy-linux.tar.gz
build-flatpak:
runs-on: ubuntu-latest
permissions:
id-token: write
attestations: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Replace version placeholders
run: |
# Extract version from pubspec.yaml (e.g., "1.3.1+10" -> "1.3.1")
VERSION=$(grep '^version:' pubspec.yaml | sed 's/version: //' | sed 's/+.*//' | tr -d ' ')
DATE=$(date -u +%Y-%m-%d)
echo "Version: $VERSION"
echo "Date: $DATE"
# Replace placeholders in metainfo.xml
sed -i "s/{{VERSION}}/$VERSION/g" linux/com.edde746.plezy.metainfo.xml
sed -i "s/{{DATE}}/$DATE/g" linux/com.edde746.plezy.metainfo.xml
- name: Preprocess Flatpak manifest with flatpak-flutter
run: |
docker run --rm \
-v "$PWD":/usr/src/flatpak \
-u $(id -u):$(id -g) \
theappgineer/flatpak-flutter:latest \
linux/com.edde746.plezy.yml
- name: Build Flatpak
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: plezy.flatpak
manifest-path: linux/com.edde746.plezy.yml
cache-key: flatpak-builder-${{ github.sha }}
- name: Attest Flatpak
uses: actions/attest-build-provenance@v2
with:
subject-path: plezy.flatpak
- name: Upload Flatpak
uses: actions/upload-artifact@v4
with:
name: linux-flatpak
path: plezy.flatpak
create-release:
needs: [build-android, build-ios, build-macos, build-windows, build-linux]
needs: [build-android, build-ios, build-macos, build-windows, build-linux, build-flatpak]
runs-on: ubuntu-latest
permissions:
contents: write
@@ -403,6 +451,7 @@ jobs:
artifacts/windows-portable/plezy-windows-portable.zip
artifacts/windows-installer/plezy-windows-installer.exe
artifacts/linux-app/plezy-linux.tar.gz
artifacts/linux-flatpak/plezy.flatpak
draft: true
prerelease: false
generate_release_notes: true