Merge pull request #1130 from TriliumNext/build_add-flatpak-electron

build: add flatpak build via electron-forge
This commit is contained in:
Elian Doran
2025-02-07 18:13:34 +02:00
committed by GitHub
8 changed files with 286 additions and 5 deletions

View File

@@ -15,13 +15,22 @@ 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
- name: Temporary Flatpak arm64 workaround till https://github.com/electron/forge/pull/3839 is merged
if: ${{ inputs.os == 'linux' && inputs.arch == 'arm64' }}
shell: bash
run: sed -e "s/case 'armv7l'/case 'arm64'/g" -e "s/return 'arm'/return 'aarch64'/g" -i node_modules/@electron-forge/maker-flatpak/dist/MakerFlatpak.js
- name: Update build info
shell: bash
run: npm run update-build-info

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: