feat: Add flatpak build to release-please and update flatpak

Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
This commit is contained in:
Jacob Schlecht 2026-06-20 13:27:46 -06:00
parent c15ab984fc
commit 3cc072fc34
4 changed files with 69 additions and 62 deletions

View File

@ -80,6 +80,15 @@ jobs:
PLATFORM: ${{ matrix.os }}
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
if: matrix.os == 'ubuntu-latest'
run: pnpm run publish --arch=arm64

View File

@ -38,23 +38,9 @@ const makers: ForgeConfig["makers"] = [
copyright: "Copyright (C) 2025 Revolt Platforms LTD",
}),
new MakerZIP({}),
];
// skip these makers in CI/CD
if (!process.env.PLATFORM) {
makers.push(
// must be manually built (freezes CI process)
// not much use in being published anyhow
new MakerAppX({
certPass: "",
packageExecutable: `app\\${STRINGS.execName}.exe`,
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",
id: "chat.stoat.StoatDesktop",
description: STRINGS.description,
productName: STRINGS.name,
productDescription: STRINGS.description,
@ -91,10 +77,10 @@ if (!process.env.PLATFORM) {
"--device=dri",
"--device=all",
"--socket=pulseaudio",
"--filesystem=home",
"--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",
@ -104,11 +90,23 @@ if (!process.env.PLATFORM) {
"--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",
"--env=TMPDIR=xdg-run/app/chat.stoat.StoatDesktop",
],
files: [],
} as MakerFlatpakOptionsConfig,
}),
];
// skip these makers in CI/CD
if (!process.env.PLATFORM) {
makers.push(
// must be manually built (freezes CI process)
// not much use in being published anyhow
new MakerAppX({
certPass: "",
packageExecutable: `app\\${STRINGS.execName}.exe`,
publisher: "CN=B040CC7E-0016-4AF5-957F-F8977A6CFA3B",
}),
// testing purposes
new MakerDeb({
options: {

View File

@ -10,8 +10,8 @@
"make": "electron-forge make",
"publish": "electron-forge publish",
"lint": "eslint --ext .ts,.tsx .",
"install:flatpak": "flatpak --user install out/make/flatpak/x86_64/chat.stoat.stoat-desktop_stable_x86_64.flatpak",
"run:flatpak": "flatpak run --socket=session-bus chat.stoat.stoat-desktop",
"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.StoatDesktop",
"run:nix": "/usr/bin/env electron-nix ."
},
"keywords": [],

View File

@ -47,7 +47,7 @@ export async function setBadgeCount(count: number) {
signature: "sa{sv}",
body: [
process.env.container === "1"
? "application://chat.stoat.stoat-desktop.desktop" // flatpak handling
? "application://chat.stoat.StoatDesktop.desktop" // flatpak handling
: "application://stoat-desktop.desktop",
[
["count", ["x", Math.min(count, 0)]],