Build Android #18
Workflow file for this run
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 Android | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Run code generation | |
run: dart run build_runner build | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Decode keystore, build Android APK and sign | |
env: | |
SIGNING_KEYSTORE: "keystore.jks" | |
SIGNING_KEYSTORE_PASSWORD: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }} | |
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | |
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
run: | | |
echo "${{ secrets.SIGNING_KEYSTORE }}" | base64 --decode > android/app/keystore.jks | |
flutter build apk --release | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: android-build | |
path: build/app/outputs/flutter-apk/app-release.apk | |
if-no-files-found: ignore | |
retention-days: 7 # specifies how long to keep the artifact |