Member-only story
Creating a Complete GitHub Workflow for Flutter
The fastest and easiest way to build and test your Flutter app

In this article I will show how to set a simple and easy Flutter workflow that will:
- Build your source code
- Run unit tests
- Upload the code coverage
- Run integrated tests
- Generate and upload an APK file
- Take integrated tests screenshots and upload the files
If you’re not a Medium paid member, you can read this story for free using the following link
Create our Flutter example app
Before creating our workflow we need one app, and for now, the default template is enough
Create a new Flutter app and run it in an android emulator or physical device.
I have named my project as flutter_workflow_example

Next, create a new GitHub repository and push all the code to it.
Git Hub Actions
A GitHub Action is a free CI/CD platform that allows workflow creation for building, testing, publishing, and many other possibilities completely integrated with GitHub.
Users can collaboratively create and share new actions on the platform which is a smart and efficient way of promoting collaboration and code reuse.
Creating a GitHub Action for your Flutter app is simple and straightforward, and it could be done in seconds, so let’s create our workflow, and then I will explain it step by step how it works:
First, create the .github/workflows/main.yml
file, and paste the code below on it:
name: Flutter Workflow
on: [push, workflow_dispatch]
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '2.10.0'
channel: 'stable'
- name…