🤖 Android Build #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: 🤖 Android Build | |
on: | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
android_build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: | | |
echo "${{ secrets.ANDROID_RELEASE_KEYSTORE }}" > android/release.keystore.asc | |
gpg -d --passphrase "${{secrets.ANDROID_RELEASE_KEYSTORE_ENCRYPTION_PASSPHRASE }}" --batch android/release.keystore.asc > android/release.keystore | |
- run: | | |
echo "storeFile=release.keystore" >> android/key.properties | |
echo "storePassword=${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSPHRASE }}" >> android/key.properties | |
echo "keyAlias=upload" >> android/key.properties | |
echo "keyPassword=${{ secrets.ANDROID_ALIAS_PW }}" >> android/key.properties | |
- name: Setup secrets | |
uses: ./.github/actions/add-secrets | |
with: | |
mapaccesstoken: ${{ secrets.MAPACCESSTOKEN }} | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: "zulu" | |
java-version: "11" | |
# - uses: nttld/setup-ndk@v1.0.6 | |
# id: setup-ndk | |
# with: | |
# ndk-version: r21e | |
# add-to-path: false | |
- name: Setup flutter | |
uses: ./.github/actions/flutter-version | |
# - run: flutter upgrade | |
- run: flutter pub get | |
- name: generate isar files | |
run: flutter pub run build_runner build --delete-conflicting-outputs | |
- run: flutter build apk --release --verbose | |
# env: | |
# ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
- run: flutter build appbundle --release #--flavor aab | |
# env: | |
# ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: android | |
path: | | |
build/app/outputs/flutter-apk/app-release.apk | |
build/app/outputs/bundle/release/app-release.aab |