feat(ci): add flatpak build via electron-forge

arm64 currently is broken due to a bug in electron-forge's maker-flatpak, but PR with a fix was submitted already
This commit is contained in:
Panagiotis Papadopoulos 2025-02-06 23:28:17 +01:00
parent 1a89a0989d
commit 1ec2b8b145
4 changed files with 13 additions and 5 deletions

View File

@ -15,10 +15,15 @@ runs:
if: ${{ inputs.os == 'macos' }}
shell: bash
run: brew install python-setuptools
- name: Install rpm on Ubuntu for RPM package building
- name: Install dependencies for RPM and Flatpak package building
if: ${{ inputs.os == 'linux' }}
shell: bash
run: sudo apt install rpm
run: |
sudo apt-get update && sudo apt-get install rpm flatpak-builder elfutils
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
FLATPAK_ARCH=$(if [[ ${{ inputs.arch }} = 'arm64' ]]; then echo 'aarch64'; else echo 'x86_64'; fi)
FLATPAK_VERSION='24.08'
flatpak install --user --no-deps --arch $FLATPAK_ARCH --assumeyes runtime/org.freedesktop.Platform/$FLATPAK_ARCH/$FLATPAK_VERSION runtime/org.freedesktop.Sdk/$FLATPAK_ARCH/$FLATPAK_VERSION org.electronjs.Electron2.BaseApp/$FLATPAK_ARCH/$FLATPAK_VERSION
- name: Install dependencies
shell: bash
run: npm ci

View File

@ -26,7 +26,7 @@ jobs:
extension: [dmg, zip]
- name: linux
image: ubuntu-latest
extension: [deb, rpm, zip]
extension: [deb, rpm, zip, flatpak]
- name: windows
image: windows-latest
extension: exe
@ -53,6 +53,7 @@ jobs:
with:
name: TriliumNextNotes ${{ matrix.os.name }} ${{ matrix.arch }}.${{matrix.os.extension}}
path: upload/*.${{ matrix.os.extension }}
build_linux_server:
name: Build Linux Server
strategy:

View File

@ -23,7 +23,7 @@ jobs:
extension: [dmg, zip]
- name: linux
image: ubuntu-latest
extension: [deb, rpm, zip]
extension: [deb, rpm, zip, flatpak]
- name: windows
image: windows-latest
extension: exe
@ -56,6 +56,7 @@ jobs:
files: upload/*.*
tag_name: nightly
name: Nightly Build
nightly-server:
name: Deploy server nightly
strategy:

View File

@ -23,7 +23,7 @@ jobs:
extension: [dmg, zip]
- name: linux
image: ubuntu-latest
extension: [deb, rpm, zip]
extension: [deb, rpm, zip, flatpak]
- name: windows
image: windows-latest
extension: exe
@ -46,6 +46,7 @@ jobs:
draft: true
fail_on_unmatched_files: true
files: upload/*.*
build_linux_server-x64:
name: Build Linux Server
strategy: