From 1c16b743d81f2b5c8c96e55d97176af3c0596024 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 15 Oct 2026 12:49:11 +0200 Subject: [PATCH] build: flatpak and deb targets, Gitea Actions workflow Co-Authored-By: Claude Sonnet 5.5 --- .gitea/workflows/build.yml | 57 ++++++++++++++++++++++++++++++++++++++ package.json | 29 +++++++++++++++++-- 2 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..3d0db7c --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,57 @@ +# Builds Ink for Linux and Windows on every v* tag (or by hand) on a Gitea Actions runner. +# macOS needs a Mac runner labelled "macos"; the job below stays off until you add one. +name: build +on: + push: + tags: ['v*'] + workflow_dispatch: + +jobs: + linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Tools + run: | + sudo apt-get update + sudo apt-get install -y flatpak flatpak-builder fakeroot dpkg rpm libarchive-tools + sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo + sudo flatpak install -y flathub org.freedesktop.Platform//25.08 org.freedesktop.Sdk//25.08 org.electronjs.Electron2.BaseApp//25.08 + npm i -g bun + - run: bun install --frozen-lockfile --ignore-scripts + - run: bun run build + - run: bunx electron-builder --linux AppImage deb flatpak + - uses: actions/upload-artifact@v3 + with: + name: linux + path: | + dist/*.AppImage + dist/*.deb + dist/*.flatpak + + windows: + runs-on: ubuntu-latest + container: electronuserland/builder:wine + steps: + - uses: actions/checkout@v4 + - run: npm i -g bun + - run: bun install --frozen-lockfile --ignore-scripts + - run: bun run build + - run: bunx electron-builder --win nsis + - uses: actions/upload-artifact@v3 + with: + name: windows + path: dist/*.exe + + # macos: + # runs-on: macos + # steps: + # - uses: actions/checkout@v4 + # - run: npm i -g bun + # - run: bun install --frozen-lockfile --ignore-scripts + # - run: bun run build + # - run: bunx electron-builder --mac dmg + # - uses: actions/upload-artifact@v3 + # with: + # name: macos + # path: dist/*.dmg diff --git a/package.json b/package.json index 72322ac..9670d5e 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "e2e": "node scripts/e2e.mjs", "postinstall": "bun node_modules/electron/install.js && svelte-kit sync && electron-rebuild -f -w better-sqlite3", "icons": "./scripts/icons.sh", - "test:e2e": "node scripts/e2e.mjs" + "test:e2e": "node scripts/e2e.mjs", + "dist:flatpak": "vite build && electron-builder --linux flatpak" }, "trustedDependencies": [ "electron" @@ -90,7 +91,9 @@ "linux": { "icon": "resources/icons", "target": [ - "AppImage" + "AppImage", + "deb", + "flatpak" ], "category": "Office", "executableName": "ink", @@ -101,6 +104,28 @@ "Keywords": "notes;markdown;writing;kanban;journal;", "StartupWMClass": "ink" } + }, + "flatpak": { + "runtime": "org.freedesktop.Platform", + "runtimeVersion": "25.08", + "sdk": "org.freedesktop.Sdk", + "base": "org.electronjs.Electron2.BaseApp", + "baseVersion": "25.08", + "finishArgs": [ + "--socket=wayland", + "--socket=x11", + "--share=ipc", + "--device=dri", + "--socket=pulseaudio", + "--share=network", + "--filesystem=home", + "--talk-name=org.freedesktop.Notifications", + "--talk-name=org.freedesktop.FileManager1" + ] } + }, + "author": { + "name": "Joel Muenster", + "email": "joel.muenster@proton.me" } }