Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add flatpak build via electron-forge #1130

Merged
merged 8 commits into from
Feb 7, 2025

Conversation

pano9000
Copy link
Member

@pano9000 pano9000 commented Feb 6, 2025

Hi,

this PR adds the ability to build a Flatpak package via Github CI using electron-forge.
arm64 support is currently broken, but a PR is opened at electron-forge, to fix that issue.

What we might need to agree still:
is the ID I've used here "acceptable"?
com.github.triliumnext.notes

The original Trilium was using com.github.zadam.trilium

this closes #233

previously it was defaulting to an EOL version of the Platform/SDK

Explicitly setting it to 24.08 however makes the build fail, because it defaults to using an outdated "zypak" module, so we need to explicitly mention the latest version here too
arm64 currently is broken due to a bug in electron-forge's maker-flatpak, but PR with a fix was submitted already
@pano9000
Copy link
Member Author

pano9000 commented Feb 6, 2025

one tiny thing I still need to do there as well: kinda "hack" my fix for arm64 into the workflow, as we don't know how fast the change will land in upstream.
If I don't add this "temporary workaround" the arm64 build workflow will fail fully, and we won't have any built arm64.

I will commit tomorrow morning (should be a matter of a small sed command to make the changes "on the fly".)

currently required, because Flatpak arm64 build currently fails – and if it fails, the remaining builds (deb, rpm, zip) fail as well, as they are created in the same run.
once the fix is released in the next electron-forge, we can get rid of this again.
@pano9000 pano9000 marked this pull request as ready for review February 7, 2025 07:25
@pano9000
Copy link
Member Author

pano9000 commented Feb 7, 2025

temporary fix commited and builds fine for both x64 and arm64 on my fork :-)

grafik

You can find the files here:
https://github.com/pano9000/TriliumNextNotes/releases/tag/test-workflow-flatpak

they seem to install and work fine on my Ubuntu system:

grafik

will keep an eye on the upstream PR and monitor, when it will be part of the next electron-forge release, so that we can get rid of the temporary fix again.

Copy link
Contributor

@eliandoran eliandoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@eliandoran eliandoran merged commit 97b7033 into develop Feb 7, 2025
5 checks passed
@eliandoran eliandoran deleted the build_add-flatpak-electron branch February 7, 2025 16:13
@eliandoran
Copy link
Contributor

@pano9000 , we'll go for com.triliumnext.notes instead as we own the domain. Not very fond of GitHub-based names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate Flatpak builds
2 participants