feat: Add flatpak build to release-please and update flatpak
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
This commit is contained in:
parent
c15ab984fc
commit
3cc072fc34
|
|
@ -80,6 +80,15 @@ jobs:
|
||||||
PLATFORM: ${{ matrix.os }}
|
PLATFORM: ${{ matrix.os }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Install Flatpak Tooling and Runtimes
|
||||||
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y flatpak flatpak-builder
|
||||||
|
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||||
|
flatpak install -y --user flathub org.freedesktop.Platform//25.08 org.freedesktop.Sdk//25.08
|
||||||
|
flatpak install -y --user flathub org.electronjs.Electron2.BaseApp//stable
|
||||||
|
|
||||||
- name: Publish Linux arm64
|
- name: Publish Linux arm64
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
run: pnpm run publish --arch=arm64
|
run: pnpm run publish --arch=arm64
|
||||||
|
|
|
||||||
116
forge.config.ts
116
forge.config.ts
|
|
@ -38,6 +38,63 @@ const makers: ForgeConfig["makers"] = [
|
||||||
copyright: "Copyright (C) 2025 Revolt Platforms LTD",
|
copyright: "Copyright (C) 2025 Revolt Platforms LTD",
|
||||||
}),
|
}),
|
||||||
new MakerZIP({}),
|
new MakerZIP({}),
|
||||||
|
new MakerFlatpak({
|
||||||
|
options: {
|
||||||
|
id: "chat.stoat.StoatDesktop",
|
||||||
|
description: STRINGS.description,
|
||||||
|
productName: STRINGS.name,
|
||||||
|
productDescription: STRINGS.description,
|
||||||
|
runtimeVersion: "25.08",
|
||||||
|
icon: {
|
||||||
|
"16x16": `${ASSET_DIR}/hicolor/16x16.png`,
|
||||||
|
"32x32": `${ASSET_DIR}/hicolor/32x32.png`,
|
||||||
|
"64x64": `${ASSET_DIR}/hicolor/64x64.png`,
|
||||||
|
"128x128": `${ASSET_DIR}/hicolor/128x128.png`,
|
||||||
|
"256x256": `${ASSET_DIR}/hicolor/256x256.png`,
|
||||||
|
"512x512": `${ASSET_DIR}/hicolor/512x512.png`,
|
||||||
|
} as unknown,
|
||||||
|
categories: ["Network"],
|
||||||
|
modules: [
|
||||||
|
// use the latest zypak -- Electron sandboxing for Flatpak
|
||||||
|
{
|
||||||
|
name: "zypak",
|
||||||
|
sources: [
|
||||||
|
{
|
||||||
|
type: "git",
|
||||||
|
url: "https://github.com/refi64/zypak",
|
||||||
|
tag: "v2025.09",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
finishArgs: [
|
||||||
|
// default arguments found by running
|
||||||
|
// DEBUG=electron-installer-flatpak* pnpm make
|
||||||
|
"--socket=fallback-x11",
|
||||||
|
"--socket=wayland",
|
||||||
|
"--share=ipc",
|
||||||
|
"--share=network",
|
||||||
|
"--device=dri",
|
||||||
|
"--device=all",
|
||||||
|
"--socket=pulseaudio",
|
||||||
|
"--filesystem=xdg-run/pipewire-0",
|
||||||
|
"--filesystem=xdg-videos:ro",
|
||||||
|
"--filesystem=xdg-pictures:ro",
|
||||||
|
"--filesystem=xdg-download",
|
||||||
|
"--filesystem=xdg-run/speech-dispatcher",
|
||||||
|
"--talk-name=org.freedesktop.ScreenSaver",
|
||||||
|
"--talk-name=org.freedesktop.Notifications",
|
||||||
|
"--talk-name=org.kde.StatusNotifierWatcher",
|
||||||
|
"--talk-name=com.canonical.AppMenu.Registrar",
|
||||||
|
"--talk-name=com.canonical.indicator.application",
|
||||||
|
"--talk-name=com.canonical.Unity",
|
||||||
|
"--env=XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons",
|
||||||
|
"--env=ELECTRON_TRASH=gio",
|
||||||
|
"--env=TMPDIR=xdg-run/app/chat.stoat.StoatDesktop",
|
||||||
|
],
|
||||||
|
files: [],
|
||||||
|
} as MakerFlatpakOptionsConfig,
|
||||||
|
}),
|
||||||
];
|
];
|
||||||
|
|
||||||
// skip these makers in CI/CD
|
// skip these makers in CI/CD
|
||||||
|
|
@ -50,65 +107,6 @@ if (!process.env.PLATFORM) {
|
||||||
packageExecutable: `app\\${STRINGS.execName}.exe`,
|
packageExecutable: `app\\${STRINGS.execName}.exe`,
|
||||||
publisher: "CN=B040CC7E-0016-4AF5-957F-F8977A6CFA3B",
|
publisher: "CN=B040CC7E-0016-4AF5-957F-F8977A6CFA3B",
|
||||||
}),
|
}),
|
||||||
// flatpak publishing should occur through flathub repos.
|
|
||||||
// this is just for testing purposes
|
|
||||||
new MakerFlatpak({
|
|
||||||
options: {
|
|
||||||
id: "chat.stoat.stoat-desktop",
|
|
||||||
description: STRINGS.description,
|
|
||||||
productName: STRINGS.name,
|
|
||||||
productDescription: STRINGS.description,
|
|
||||||
runtimeVersion: "25.08",
|
|
||||||
icon: {
|
|
||||||
"16x16": `${ASSET_DIR}/hicolor/16x16.png`,
|
|
||||||
"32x32": `${ASSET_DIR}/hicolor/32x32.png`,
|
|
||||||
"64x64": `${ASSET_DIR}/hicolor/64x64.png`,
|
|
||||||
"128x128": `${ASSET_DIR}/hicolor/128x128.png`,
|
|
||||||
"256x256": `${ASSET_DIR}/hicolor/256x256.png`,
|
|
||||||
"512x512": `${ASSET_DIR}/hicolor/512x512.png`,
|
|
||||||
} as unknown,
|
|
||||||
categories: ["Network"],
|
|
||||||
modules: [
|
|
||||||
// use the latest zypak -- Electron sandboxing for Flatpak
|
|
||||||
{
|
|
||||||
name: "zypak",
|
|
||||||
sources: [
|
|
||||||
{
|
|
||||||
type: "git",
|
|
||||||
url: "https://github.com/refi64/zypak",
|
|
||||||
tag: "v2025.09",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
finishArgs: [
|
|
||||||
// default arguments found by running
|
|
||||||
// DEBUG=electron-installer-flatpak* pnpm make
|
|
||||||
"--socket=fallback-x11",
|
|
||||||
"--socket=wayland",
|
|
||||||
"--share=ipc",
|
|
||||||
"--share=network",
|
|
||||||
"--device=dri",
|
|
||||||
"--device=all",
|
|
||||||
"--socket=pulseaudio",
|
|
||||||
"--filesystem=home",
|
|
||||||
"--filesystem=xdg-run/pipewire-0",
|
|
||||||
"--filesystem=xdg-videos:ro",
|
|
||||||
"--filesystem=xdg-pictures:ro",
|
|
||||||
"--filesystem=xdg-run/speech-dispatcher",
|
|
||||||
"--talk-name=org.freedesktop.ScreenSaver",
|
|
||||||
"--talk-name=org.freedesktop.Notifications",
|
|
||||||
"--talk-name=org.kde.StatusNotifierWatcher",
|
|
||||||
"--talk-name=com.canonical.AppMenu.Registrar",
|
|
||||||
"--talk-name=com.canonical.indicator.application",
|
|
||||||
"--talk-name=com.canonical.Unity",
|
|
||||||
"--env=XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons",
|
|
||||||
"--env=ELECTRON_TRASH=gio",
|
|
||||||
"--env=TMPDIR=xdg-run/app/chat.stoat.stoat-desktop",
|
|
||||||
],
|
|
||||||
files: [],
|
|
||||||
} as MakerFlatpakOptionsConfig,
|
|
||||||
}),
|
|
||||||
// testing purposes
|
// testing purposes
|
||||||
new MakerDeb({
|
new MakerDeb({
|
||||||
options: {
|
options: {
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@
|
||||||
"make": "electron-forge make",
|
"make": "electron-forge make",
|
||||||
"publish": "electron-forge publish",
|
"publish": "electron-forge publish",
|
||||||
"lint": "eslint --ext .ts,.tsx .",
|
"lint": "eslint --ext .ts,.tsx .",
|
||||||
"install:flatpak": "flatpak --user install out/make/flatpak/x86_64/chat.stoat.stoat-desktop_stable_x86_64.flatpak",
|
"install:flatpak": "flatpak --user install out/make/flatpak/x86_64/chat.stoat.StoatDesktop_stable_x86_64.flatpak",
|
||||||
"run:flatpak": "flatpak run --socket=session-bus chat.stoat.stoat-desktop",
|
"run:flatpak": "flatpak run --socket=session-bus chat.stoat.StoatDesktop",
|
||||||
"run:nix": "/usr/bin/env electron-nix ."
|
"run:nix": "/usr/bin/env electron-nix ."
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ export async function setBadgeCount(count: number) {
|
||||||
signature: "sa{sv}",
|
signature: "sa{sv}",
|
||||||
body: [
|
body: [
|
||||||
process.env.container === "1"
|
process.env.container === "1"
|
||||||
? "application://chat.stoat.stoat-desktop.desktop" // flatpak handling
|
? "application://chat.stoat.StoatDesktop.desktop" // flatpak handling
|
||||||
: "application://stoat-desktop.desktop",
|
: "application://stoat-desktop.desktop",
|
||||||
[
|
[
|
||||||
["count", ["x", Math.min(count, 0)]],
|
["count", ["x", Math.min(count, 0)]],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue