add build workflow #27
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 APK | |
on: | |
pull_request: | |
branches: | |
- development | |
push: | |
branches: | |
- development | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: app | |
steps: | |
- name: Set up Repository | |
uses: actions/checkout@v4 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: "3.27.2" | |
channel: "stable" | |
- name: Get dependencies | |
run: flutter pub get | |
- name: Initialize Reflectable | |
run: dart run build_runner build | |
- name: Create app_config_local.dart from template | |
run: cp lib/app_config_local.template lib/app_config_local.dart | |
- name: Ensure Build Script is Executable | |
run: chmod +x build.sh | |
- name: Run Build Script | |
run: | | |
./build.sh --build --local | |
echo "Build script exited with code $?" | |
- name: List build output files | |
run: ls -R build/app/outputs/flutter-apk | |
- name: List build output files | |
run: ls -lh ${{ github.workspace }}/build/app/outputs/flutter-apk | |
- name: Upload APK Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-apk | |
path: ${{ github.workspace }}/build/app/outputs/flutter-apk/app-debug.apk |