mod-desktop icon indicating copy to clipboard operation
mod-desktop copied to clipboard

Add basic flatpak support

Open agorgl opened this issue 1 year ago • 12 comments

Adds working flatpak manifest based on github releases

agorgl avatar Nov 05 '24 08:11 agorgl

A very good start, but how do we even build this?

A CI step to generate some flatpak file would be great.

falkTX avatar Nov 05 '24 09:11 falkTX

As per the official flatpak documentation (https://docs.flatpak.org/en/latest/first-build.html), building it is as simple as:

flatpak-builder --force-clean --user --install-deps-from=flathub --repo=repo --install builddir audio.mod.mod-desktop.yaml

agorgl avatar Nov 05 '24 09:11 agorgl

I suppose we could use this action to build it using the CI: https://github.com/flatpak/flatpak-github-actions

agorgl avatar Nov 05 '24 09:11 agorgl

Just added a basic github action to build the flatpak too

agorgl avatar Nov 05 '24 09:11 agorgl

the CI needs to trigger for regular pushes and PRs, not just on release

falkTX avatar Nov 05 '24 09:11 falkTX

Currently the flatpak manifest depends upon releases, so there is no point in running the flatpak github action on regular pushes and PRs yet. After supporting build from latest sources then we can change the flatpak action to run on every push and PR.

agorgl avatar Nov 05 '24 09:11 agorgl

sure but we need to test if it even works first, and the point is to not have it use release binaries anyhow.

falkTX avatar Nov 05 '24 09:11 falkTX

Yeah, the whole point of this PR is to provide a basis for flatpak support, and make a flatpak build that can be published to flathub.

As a second step we can augment this even more and modify the flatpak manifest to build from sources and not from releases, and finally merge the flatpak action as part of the build workflow/process to have flatpak binaries on releases too, along with every PR/commit.

agorgl avatar Nov 05 '24 09:11 agorgl

sure but I wish to test if the CI action works before merging, and that is not possible to do if the CI file requires a new release to be made just to test it...

it is fine to let the CI run more often than needed, but the other way around is not.

falkTX avatar Nov 05 '24 09:11 falkTX

Changed flatpak workflow trigger event to on: workflow_dispatch to allow for manual triggers, as this is currently the best fit for this setup

agorgl avatar Nov 05 '24 09:11 agorgl

Resulting flatpak now also exports the correct icon and desktop file

agorgl avatar Nov 05 '24 11:11 agorgl

Added the required metainfo file that is needed for publishing in relevant hubs/stores like flathub also, the app should be ready for publishing

agorgl avatar Nov 05 '24 12:11 agorgl