dragotin / kraft

Kraft helps to handle your daily quotes and invoices in your small business.
http://volle-kraft-voraus.de
GNU General Public License v2.0
58 stars 18 forks source link

Build AppImages on GitHub #186

Closed TheAssassin closed 2 years ago

TheAssassin commented 2 years ago

This PR implements automatic building of Kraft AppImages on GitHub actions using appimagecraft.

The AppImage will contain weasyprint using linuxdeploy-plugin-conda, which is made available from <AppDir>/usr/bin/weasyprint (a simple shell script that calls weasyprint from the bundled miniconda environment). You need to adjust your code to also look for that binary. It wouldn't be a good idea to export PATH, and Qt makes it relatively simple to look up the own binary's location.

pyuploadtool is used to upload AppImages built for commits the main branch (currently master) to a moving Git tag/prerelease called continuous. When tags are built, it automatically creates a release with the binaries. This is demonstrated here.

Overall, all of this is achieved with a minimum of code, the tools involved make it really simple.

Please note that openSUSE Leap 15.2 is most likely not a very good build platform. It is a relatively recent release, thus the resulting AppImage will most likely run only on recent distribution releases as well (>= Ubuntu bionic, according to appimagelint, but that remains to be proven in real world tests). Also, it's end-of-life and won't see updates any more. Overall, you may want to switch to, e.g., the oldest still-supported Ubuntu LTS release (18.04 aka bionic at the moment).