workflow created #3
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: "Build & Release Flutter APP" | |
# Define when to trigger the workflow (on each push to the main branch) | |
## Whatever push changes occurs to main branch, this workflow will trigger. | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
flutterBuildRelease: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout to current | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Use the setup-java action to configure the Java environment | |
- name: 'Set up JDK 17' | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: 'gradle' | |
# Setup Flutter in the VM | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: 3.10.0 | |
# Run flutter commands | |
- name: Run flutter pub get | |
run: flutter pub get | |
- name: 📦 Install dependencies | |
run: flutter pub get | |
# - name: 🕵️ Analyze to check for bad Dart/Flutter practices | |
# run: flutter analyze | |
# - run: flutter format --set-exit-if-changed . | |
# - run: flutter analyze . | |
# Build Android APK release file | |
- name: Build | |
run: flutter build apk --split-per-abi |