Mobile Programming
GitHub Actions | Automated Tests | APK/AAB Builds | Safer Releases
Turn every code change into a consistent, tested, and traceable process.
By the end of this session, students should be able to:
pull_request
push
main
v1.2.0
workflow_dispatch
.github/workflows/
Make triggers, permissions, steps, and outputs easy to review.
steps: - uses: actions/checkout@v4 - uses: subosito/flutter-action@v2 with: channel: stable - run: flutter pub get - run: dart format --output=none --set-exit-if-changed . - run: flutter analyze --fatal-infos - run: flutter test --coverage
- run: flutter build apk --release - run: flutter build appbundle --release - uses: actions/upload-artifact@v4 with: name: android-builds path: | build/app/outputs/flutter-apk/app-release.apk build/app/outputs/bundle/release/app-release.aab if-no-files-found: error retention-days: 7
Example version in pubspec.yaml:
pubspec.yaml
version: 1.2.0+15
1.2.0
15
--dart-define
A key shipped to a client app can be extracted. Server secrets must stay on the server.
AI can draft YAML or explain a failure, but:
Challenge: ask AI to review a workflow, then compare its findings with the actual file and run logs.
docs.github.com/actions
docs.flutter.dev/deployment/cd
docs.flutter.dev/deployment/android
docs.github.com/actions/security-guides/using-secrets-in-github-actions
semver.org
Remember: a good pipeline repeats the process consistently and makes results reviewable.