Skip to content

Commit 21a0c2c

Browse files
authored
build: add flatpak (#398)
* build: add flatpak * fixes * add flatpak dependencies to github actions build matrix * fix flatpak build on gha
1 parent 9957252 commit 21a0c2c

File tree

2 files changed

+28
-11
lines changed

2 files changed

+28
-11
lines changed

.github/workflows/_build-matrix.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ jobs:
3333
apple-issuer-id: ${{ secrets.APPLE_ISSUER_ID }}
3434
apple-key-id: ${{ secrets.APPLE_KEY_ID }}
3535

36+
- name: Install Flatpak tool-chain (Linux only)
37+
if: runner.os == 'Linux'
38+
run: |
39+
sudo apt-get update
40+
# flatpak itself isn’t strictly required to *build*, but it’s good to have.
41+
sudo apt-get install -y --no-install-recommends \
42+
flatpak flatpak-builder elfutils
43+
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
44+
3645
- name: Build App
3746
run: pnpm run make
3847
env:

forge.config.ts

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { MakerZIP } from '@electron-forge/maker-zip'
55
import { MakerDeb } from '@electron-forge/maker-deb'
66
import { MakerDMG } from '@electron-forge/maker-dmg'
77
import { MakerRpm } from '@electron-forge/maker-rpm'
8-
// import { MakerFlatpak } from "@electron-forge/maker-flatpak";
8+
import { MakerFlatpak } from '@electron-forge/maker-flatpak'
99
import { VitePlugin } from '@electron-forge/plugin-vite'
1010
import { FusesPlugin } from '@electron-forge/plugin-fuses'
1111
import { FuseV1Options, FuseVersion } from '@electron/fuses'
@@ -137,18 +137,26 @@ const config: ForgeConfig = {
137137
section: 'devel',
138138
},
139139
}),
140-
// Flatpak maker - uncomment and configure when ready to use
141140
// Requirements: install elfutils package and add Flathub remote
142141
// Run: flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
143-
// new MakerFlatpak({
144-
// options: {
145-
// categories: ["Development", "Utility"],
146-
// license: "Apache-2.0",
147-
// files: [
148-
// // Add required files configuration here
149-
// ],
150-
// },
151-
// }),
142+
new MakerFlatpak({
143+
options: {
144+
categories: ['Development', 'Utility'],
145+
id: 'com.stacklok.ToolHiveStudio',
146+
finishArgs: [
147+
'--share=network',
148+
'--socket=x11',
149+
'--socket=wayland',
150+
'--device=dri',
151+
'--socket=system-bus',
152+
'--socket=session-bus',
153+
'--filesystem=/run/docker.sock',
154+
'--filesystem=/run/podman/podman.sock',
155+
],
156+
icon: './icons/icon.png',
157+
files: [],
158+
},
159+
}),
152160
],
153161

154162
plugins: [

0 commit comments

Comments
 (0)