ci: flatpak build
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Name=Plezy
|
||||
Comment=A beautiful Plex client for Flutter
|
||||
Exec=plezy
|
||||
Icon=com.edde746.plezy
|
||||
Type=Application
|
||||
Categories=AudioVideo;Video;Player;
|
||||
Terminal=false
|
||||
StartupNotify=true
|
||||
Keywords=plex;media;video;streaming;
|
||||
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop-application">
|
||||
<id>com.edde746.plezy</id>
|
||||
<name>Plezy</name>
|
||||
<summary>A beautiful Plex client for Flutter</summary>
|
||||
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>MIT</project_license>
|
||||
|
||||
<description>
|
||||
<p>
|
||||
Plezy is a beautiful Plex client built with Flutter, offering a modern and intuitive
|
||||
interface for accessing your Plex media library.
|
||||
</p>
|
||||
<p>Features:</p>
|
||||
<ul>
|
||||
<li>Stream your Plex media library</li>
|
||||
<li>Modern, responsive user interface</li>
|
||||
<li>Support for video playback with hardware acceleration</li>
|
||||
<li>Cross-platform compatibility</li>
|
||||
</ul>
|
||||
</description>
|
||||
|
||||
<launchable type="desktop-id">com.edde746.plezy.desktop</launchable>
|
||||
|
||||
<url type="homepage">https://github.com/edde746/plex-flutter</url>
|
||||
<url type="bugtracker">https://github.com/edde746/plex-flutter/issues</url>
|
||||
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<caption>Plezy main interface</caption>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
|
||||
<content_rating type="oars-1.1" />
|
||||
|
||||
<releases>
|
||||
<release version="{{VERSION}}" date="{{DATE}}">
|
||||
<description>
|
||||
<p>Latest release</p>
|
||||
</description>
|
||||
</release>
|
||||
</releases>
|
||||
|
||||
<categories>
|
||||
<category>AudioVideo</category>
|
||||
<category>Video</category>
|
||||
<category>Player</category>
|
||||
</categories>
|
||||
|
||||
<keywords>
|
||||
<keyword>plex</keyword>
|
||||
<keyword>media</keyword>
|
||||
<keyword>video</keyword>
|
||||
<keyword>streaming</keyword>
|
||||
</keywords>
|
||||
</component>
|
||||
@@ -0,0 +1,87 @@
|
||||
app-id: com.edde746.plezy
|
||||
runtime: org.freedesktop.Platform
|
||||
runtime-version: '23.08'
|
||||
sdk: org.freedesktop.Sdk
|
||||
command: plezy
|
||||
|
||||
finish-args:
|
||||
# Graphics and display
|
||||
- --share=ipc
|
||||
- --socket=x11
|
||||
- --socket=wayland
|
||||
- --device=dri
|
||||
|
||||
# Audio
|
||||
- --socket=pulseaudio
|
||||
|
||||
# Network access (required for Plex)
|
||||
- --share=network
|
||||
|
||||
# Minimal filesystem access (home directory read-only)
|
||||
- --filesystem=home:ro
|
||||
|
||||
# Allow access to config directory
|
||||
- --filesystem=xdg-config/plezy:create
|
||||
- --filesystem=xdg-data/plezy:create
|
||||
|
||||
modules:
|
||||
# MPV for video playback
|
||||
- name: mpv
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- python3 waf configure --prefix=/app --enable-libmpv-shared --disable-cplayer --disable-build-date
|
||||
--disable-alsa
|
||||
- python3 waf build
|
||||
- python3 waf install
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/mpv-player/mpv/archive/v0.37.0.tar.gz
|
||||
sha256: 1d2d4adbaf048a2fa6ee134575032c4b2dad9a7efafd5b3e69b88db935afaddf
|
||||
- type: file
|
||||
url: https://waf.io/waf-2.0.25
|
||||
sha256: 21199cd220ccf60434133e1fd2ab8c8e5217c3799199c82722543970dc8e38d5
|
||||
dest-filename: waf
|
||||
cleanup:
|
||||
- /include
|
||||
- /lib/pkgconfig
|
||||
- /share/man
|
||||
|
||||
# Main application
|
||||
- name: plezy
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
# Set up Flutter PATH
|
||||
- export PATH="$PATH:/usr/src/flatpak/flutter/bin"
|
||||
- export PUB_CACHE=/usr/src/flatpak/.pub-cache
|
||||
|
||||
# Build the app
|
||||
- flutter build linux --release --dart-define=ENABLE_UPDATE_CHECK=true
|
||||
|
||||
# Install application files
|
||||
- mkdir -p /app/bin
|
||||
- mkdir -p /app/share/applications
|
||||
- mkdir -p /app/share/metainfo
|
||||
- mkdir -p /app/share/icons/hicolor/512x512/apps
|
||||
|
||||
# Copy built application
|
||||
- cp -r build/linux/x64/release/bundle /app/plezy
|
||||
- ln -s /app/plezy/plezy /app/bin/plezy
|
||||
|
||||
# Install desktop file and metadata
|
||||
- install -Dm644 linux/com.edde746.plezy.desktop /app/share/applications/com.edde746.plezy.desktop
|
||||
- install -Dm644 linux/com.edde746.plezy.metainfo.xml /app/share/metainfo/com.edde746.plezy.metainfo.xml
|
||||
|
||||
# Install icon
|
||||
- install -Dm644 android/fastlane/metadata/android/en-GB/images/icon.png /app/share/icons/hicolor/512x512/apps/com.edde746.plezy.png
|
||||
|
||||
sources:
|
||||
- type: git
|
||||
url: https://github.com/edde746/plex-flutter.git
|
||||
# NOTE: This will be replaced with actual commit hash by flatpak-flutter preprocessing
|
||||
commit: HEAD
|
||||
|
||||
- type: git
|
||||
url: https://github.com/flutter/flutter.git
|
||||
# NOTE: This will be replaced with SDK modules by flatpak-flutter preprocessing
|
||||
tag: stable
|
||||
dest: flutter
|
||||
Reference in New Issue
Block a user