mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 09:01:03 -08:00
ci(flatpak): add Flatpak support with metainfo and asset validation
Entire-Checkpoint: 21b9b9f90f23
This commit is contained in:
1 parent
b9ab4d5ab5
commit
1136e9abac
8 files changed
+105
-1
No files matched your search
@@ -49,7 +49,7 @@ jobs:
|
||||
if: matrix.os == 'linux'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install --no-install-recommends -y rpm libarchive-tools flatpak flatpak-builder
|
||||
sudo apt-get install --no-install-recommends -y rpm libarchive-tools flatpak flatpak-builder appstream
|
||||
|
||||
# Configure Flatpak
|
||||
# 1. Add the Flathub repository (source of runtimes)
|
||||
@@ -68,6 +68,27 @@ jobs:
|
||||
- name: Build backend
|
||||
run: pnpm run build:backend
|
||||
|
||||
- name: Validate AppStream metadata
|
||||
if: matrix.os == 'linux'
|
||||
run: appstreamcli validate --pedantic --no-net apps/electron-backend/linux/com.fourgray.iptvnator.metainfo.xml
|
||||
|
||||
- name: Build website
|
||||
if: matrix.os == 'linux'
|
||||
run: pnpm nx build website --skip-nx-cache
|
||||
|
||||
- name: Verify AppStream website assets
|
||||
if: matrix.os == 'linux'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
for screenshot in player playlists epg settings; do
|
||||
if ! find dist/apps/website -path "*/appstream/${screenshot}.png" -print -quit | grep -q .; then
|
||||
echo "::error::Missing AppStream website asset for ${screenshot}.png"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Override macOS arch in electron-builder.json
|
||||
if: matrix.os == 'macos'
|
||||
run: |
|
||||
@@ -241,6 +262,7 @@ jobs:
|
||||
fi
|
||||
|
||||
flatpak install --user --noninteractive -y "${FLATPAK_BUNDLE}"
|
||||
flatpak run --command=sh com.fourgray.iptvnator -c 'test -f /app/share/metainfo/com.fourgray.iptvnator.metainfo.xml'
|
||||
flatpak run --command=sh com.fourgray.iptvnator -c '/app/bin/iptvnator --version'
|
||||
|
||||
- name: Upload artifacts (macOS)
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop-application">
|
||||
<id>com.fourgray.iptvnator</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>MIT</project_license>
|
||||
<name>IPTVnator</name>
|
||||
<developer_name>4gray</developer_name>
|
||||
<update_contact>fourgray@proton.me</update_contact>
|
||||
<summary>Open-source IPTV player for M3U, Xtream Codes, and Stalker portals</summary>
|
||||
<launchable type="desktop-id">com.fourgray.iptvnator.desktop</launchable>
|
||||
|
||||
<description>
|
||||
<p>IPTVnator is a cross-platform IPTV player for user-supplied playlists and portal connections.</p>
|
||||
<p>It supports M3U and M3U8 playlists, Xtream Codes API, and Stalker portals with EPG, catch-up, favorites, and external player integration.</p>
|
||||
<p>The app does not include channels, playlists, or media catalogs. Any IPTV sources, logos, metadata, and programme information come from services the user configures.</p>
|
||||
</description>
|
||||
|
||||
<categories>
|
||||
<category>AudioVideo</category>
|
||||
<category>Player</category>
|
||||
<category>Video</category>
|
||||
</categories>
|
||||
|
||||
<keywords>
|
||||
<keyword>IPTV</keyword>
|
||||
<keyword>M3U</keyword>
|
||||
<keyword>M3U8</keyword>
|
||||
<keyword>EPG</keyword>
|
||||
<keyword>Xtream</keyword>
|
||||
<keyword>Stalker</keyword>
|
||||
</keywords>
|
||||
|
||||
<url type="homepage">https://4gray.github.io/iptvnator/</url>
|
||||
<url type="bugtracker">https://github.com/4gray/iptvnator/issues</url>
|
||||
<url type="vcs-browser">https://github.com/4gray/iptvnator</url>
|
||||
<url type="help">https://4gray.github.io/iptvnator/blog/</url>
|
||||
<url type="donation">https://github.com/sponsors/4gray</url>
|
||||
|
||||
<content_rating type="oars-1.0"/>
|
||||
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<caption>Browse channels and watch live IPTV streams</caption>
|
||||
<image type="source">https://4gray.github.io/iptvnator/appstream/player.png</image>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<caption>Manage playlists and switch between sources</caption>
|
||||
<image type="source">https://4gray.github.io/iptvnator/appstream/playlists.png</image>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<caption>View programme schedules in the integrated EPG</caption>
|
||||
<image type="source">https://4gray.github.io/iptvnator/appstream/epg.png</image>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<caption>Adjust playback, interface, and provider settings</caption>
|
||||
<image type="source">https://4gray.github.io/iptvnator/appstream/settings.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
|
||||
<provides>
|
||||
<binary>iptvnator</binary>
|
||||
</provides>
|
||||
</component>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.7 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 46 KiB |
@@ -70,6 +70,15 @@
|
||||
"artifactName": "${name}-${version}-${os}-${arch}.${ext}",
|
||||
"icon": "apps/web/src/assets/icons"
|
||||
},
|
||||
"flatpak": {
|
||||
"branch": "stable",
|
||||
"files": [
|
||||
[
|
||||
"apps/electron-backend/linux/com.fourgray.iptvnator.metainfo.xml",
|
||||
"/share/metainfo/com.fourgray.iptvnator.metainfo.xml"
|
||||
]
|
||||
]
|
||||
},
|
||||
"afterPack": "./tools/packaging/linux-after-pack.cjs",
|
||||
"snap": {
|
||||
"confinement": "strict",
|
||||
|
||||
@@ -16,6 +16,13 @@ const workspaceRoot = process.cwd();
|
||||
const executablesRoot = path.join(workspaceRoot, 'dist', 'executables');
|
||||
const packageJsonPath = path.join(workspaceRoot, 'package.json');
|
||||
const electronBuilderConfigPath = path.join(workspaceRoot, 'electron-builder.json');
|
||||
const flatpakMetainfoPath = path.join(
|
||||
workspaceRoot,
|
||||
'apps',
|
||||
'electron-backend',
|
||||
'linux',
|
||||
'com.fourgray.iptvnator.metainfo.xml'
|
||||
);
|
||||
const packageMetadata = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
||||
const electronBuilderConfig = JSON.parse(
|
||||
fs.readFileSync(electronBuilderConfigPath, 'utf8')
|
||||
@@ -197,6 +204,9 @@ function verifyResourceDir(resourceDir) {
|
||||
}
|
||||
|
||||
if (platform === 'linux') {
|
||||
if (!fileExists(flatpakMetainfoPath)) {
|
||||
errors.push(`Missing Flatpak metainfo file: ${flatpakMetainfoPath}`);
|
||||
}
|
||||
verifyLinuxLauncher(resourceDir, errors);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user