mirror of
https://github.com/zadam/trilium.git
synced 2025-12-16 05:09:54 +01:00
Merge pull request #1130 from TriliumNext/build_add-flatpak-electron
build: add flatpak build via electron-forge
This commit is contained in:
13
.github/actions/build-electron/action.yml
vendored
13
.github/actions/build-electron/action.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user