Automation - PatilAntariksh/Mind-For-The-Blind GitHub Wiki

Flutter CI/CD Automation with GitHub Actions

Overview

This app implements a Continuous Integration and Continuous Deployment (CI/CD) pipeline using GitHub Actions. It automates key steps like dependency installation, code analysis, testing, and building the final APK, triggered by activity on the function branch.

By leveraging GitHub Actions, every code push or pull request automatically goes through validation and build processes, ensuring stability, reducing human error, and preparing production-ready artifacts.


Trigger Conditions

The workflow runs automatically on:

  • Pushes to the function branch
  • Pull requests targeting the function branch

This ensures that changes are verified before being merged or deployed.


Job 1: Build & Test

Step Description
Checkout Fetches the code from the repo
Setup Flutter Installs Flutter 3.29.1 (stable channel)
Install Dependencies Runs flutter pub get to resolve packages
Analyze Code Executes flutter analyze for lint checks
Run Tests Runs all unit tests and integration tests

This job is responsible for validating the codebase quality and functional correctness before continuing to the build stage.


Job 2: Build APK

Step Description
Checkout Checks out the code again
Setup Flutter Ensures correct Flutter version is available
Install Dependencies Runs flutter pub get
Build APK Executes flutter build apk --release
Upload Artifact Saves the release APK as a downloadable asset

This job builds the release-ready Android APK and uploads it as an artifact, making it available for download or deployment.

build-apk depends on the success of the build-and-test job.


Output

  • Release APK: Stored as a downloadable artifact in GitHub Actions.
  • Code analysis results
  • Unit & integration test results

Tools Used