added ci/cd integration for flutter app #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Flutter Build Test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build Flutter App | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true # Ensures the Flutter submodule is checked out | |
- name: Set up Java 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Set up Flutter | |
run: | | |
echo "Adding Flutter to PATH" | |
echo "$GITHUB_WORKSPACE/flutter/bin" >> $GITHUB_PATH | |
flutter/bin/flutter doctor | |
- name: Install dependencies | |
run: flutter/bin/flutter pub get | |
- name: Build APK (Release) | |
run: flutter/bin/flutter build apk --release | |
- name: Build App Bundle (AAB) | |
run: flutter/bin/flutter build appbundle --release |