Automatically build your Flutter app APKs with Travis-CI

When attempting to setup Travis-CI, I saw more than a few articles on running Flutter tests with Travis, but none for actually building and obtaining a compiled APK as we wanted.

Step 1: Create Travis Configuration

Start by creating the following directory structure.
You only need to include the .travis/ directory (also in the root) if you plan to add additional build scripts to your project.

your_project_root/
- .travis.yml
- .travis/
- utils/

Step 2: Upload the finished build to WeTransfer

This script should be placed in ./.travis/utils/runUpload.js (relative to your project root)

Step 3: Execute pre and post build web-hooks

We have web-hooks that send a message to a channel in our Discord server when a build has started or ended.
For each stage shown block above, you should add these commands underneath any that may already exist. e.g. the contents of after_failure above, should go after anything you have in your own after_failure block.

Full Stack Developer and Software Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store