A collection of useful GitHub Action Workflows to ease the building of Flet applications.
VIDEO TUTORIAL: https://youtu.be/ObO-D2TD_wo
Feel free to adapt all the workflows in this repo to your own projects: flet.dev/publish
As you might know, Flet is a cross-platform framework. This means, from a single codebase you can target multiple platforms: Android (AAB, APK), iOS (IPA), Linux, macOS, Windows, and Web.
The repository contains the following workflows (located in the .github/workflows
directory):
File Name | Builds | Runs on |
---|---|---|
aab-build.yml | Android App Bundle (AAB) | macos-latest |
apk-build.yml | Android Application Package (APK) | ubuntu-latest |
desktop-and-mobile-builds.yml | desktop [linux, macOS, windows] and mobile [Android (AAB, APK), iOS (IPA)] apps | ubuntu-latest, macos-latest, windows-latest |
desktop-build.yml | desktop [Linux, macOS, windows] apps | ubuntu-latest, macos-latest, windows-latest |
ipa-build.yml | iOS Package App Store (IPA) | macos-latest |
linux-build.yml | linux app | ubuntu-latest |
macos-build.yml | macOS app | macos-latest |
web-build-and-github-pages-deploy.yml | static web app and deploys it to GitHub Pages | ubuntu-latest |
windows-build.yml | windows app | windows-latest |
All the workflows in this repository are based on GitHub Actions. Read it's documentation to get started. Understanding the syntax will be very useful if you want to customize the workflows to suit your specific needs.
The following actions from the GitHub marketplace are used in one or more of the workflows in this repository:
See their respective documentation for more information on how to further customize their execution.
Thanks to their creators! :)
.github/workflows
directory and paste the copied content into it..yml
extension, else it won't be recognized as a workflow file.main
/master
branch. Else, you can trigger it manually by clicking on the Run workflow
button.3.22.2
and Python version 3.12.2
.workflow_dispatch
: used to trigger the workflow manually from the Actions tabflutter config --no-analytics
: disables Flutter analyticsflet build [platform] --no-rich-output
: disables rich output (ex: ✅) when running the build command. This is must be used for jobs running on Windows OS, else a UnicodeDecodeError
is raised.The below error occured on Linux when flutter doctor
was run:
[✗] Linux toolchain - develop for Linux desktop
✗ ninja is required for Linux development.
It is likely available from your distribution (e.g.: apt install ninja-build), or can be downloaded from https://github.com/ninja-build/ninja/releases
✗ GTK 3.0 development libraries are required for Linux development.
They are likely available from your distribution (e.g.: apt install libgtk-3-dev)
A step named Patch for linux build
was added to the linux-related jobs/workflows which resolves this issue by installing the required dependencies.
--verbose
) to provide more information about the build process. Provide these logs when you are willing to report an issue on the Flet repo.You can contribute by adding more workflows or improving the existing ones.
Improvements ideas:
apk-build.yml
, for example, runs on macos-latest
. Is it better (in terms of size/speed) to run it on ubuntu-latest
or windows-latest
?