Conveyor Flutter Demo
This repository shows how to package a demo Flutter app with Conveyor. It features:
- Automatic online updates, checked at each launch.
- The generated download page being hosted by GitHub pages.
- Importing version or other data from the
pubspec.yaml
file.
Conveyor is a tool that makes distributing desktop apps easier. It builds, signs and notarizes self-updating packages for you and offers many useful features like cross-building/signing of packages, different update modes (silent/background and update-at-launch), and much more.
Install yq in the machine where you run Conveyor, and then install Conveyor.
Open conveyor.conf and edit the marked lines. The config in this repository uses example deployment URLs. The package can be built by installing Conveyor and then running:
conveyor make site
The output directory will now contain packages for Windows, Mac Intel and Mac ARM along with update repository metadata and a generated download page.
Conveyor can make packages for all supported operating systems from whatever you choose to run it on, but the Flutter build system can't do the same.
The conveyor.conf
file therefore imports the raw files to package from the output of a GitHub Actions CI job.
- Make sure the
app.site.base-url
points to it, and if wanted, setapp.site.copy-to
to an SFTP URL for file upload. - Run
conveyor make site --rerun=all
. The--rerun=all
flag is needed to force a re-download of whatever the latest CI run has produced. In a real app you would point the inputs at a versioned URL and forcing a rerun wouldn't be necessary. Usecopied-site
instead ofsite
if Conveyor can upload the files for you. Otherwise, upload the results yourself.
- Delete the
app.site
object fromconveyor.conf
. The defaults for open source projects on GitHub is to use Releases. - Run
conveyor make site --rerun=all
. The--rerun=all
flag is needed to force a re-download of whatever the latest CI run has produced. In a real app you would point the inputs at a versioned URL and forcing a rerun wouldn't be necessary. - Create a new release with the contents of the
output
directory, except fordownload.html
andicon.svg
. Those files should go into thedocs
directory.
The following are examples of GitHub Workflows to:
You will need to change your conveyor.conf
to point your inputs to the
paths specified in the download-artifact
steps:
app {
windows.amd64.inputs += artifacts/windows
linux.amd64.inputs += artifacts/build-linux-amd64.tar
mac.amd64.inputs += artifacts/build-macos-amd64.tar
mac.aarch64.inputs += artifacts/build-macos-aarch64.tar
}
This repo demos:
- Importing
pubspec.yaml
to avoid redundant configuration. - Customizing the generated default icon.
- Downloading the results of GitHub Actions.
- Hosting the download page on GitHub Pages.
- Deploying via GitHub Workflows.