Skip to content

hydraulic-software/flutter-demo

 
 

Repository files navigation

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.

Deployment from your laptop

Packaging it

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.

Releasing

To a standard website

  • Make sure the app.site.base-url points to it, and if wanted, set app.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. Use copied-site instead of site if Conveyor can upload the files for you. Otherwise, upload the results yourself.

To GitHub Releases

  • Delete the app.site object from conveyor.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 for download.html and icon.svg. Those files should go into the docs directory.

Deployment via GitHub Workflow

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  
}

Packaging features used

This repo demos:

  1. Importing pubspec.yaml to avoid redundant configuration.
  2. Customizing the generated default icon.
  3. Downloading the results of GitHub Actions.
  4. Hosting the download page on GitHub Pages.
  5. Deploying via GitHub Workflows.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 44.3%
  • CMake 39.5%
  • Dart 11.6%
  • C 3.0%
  • Swift 1.6%