Build for Android #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 for Android | |
on: | |
workflow_call: | |
workflow_dispatch: | |
env: | |
PROPERTIES_PATH: "./android/key.properties" | |
jobs: | |
build_android: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Install Flutter and Flutter Dependencies | |
run: | | |
git submodule update --init --recursive | |
.flutter/bin/flutter config --no-analytics | |
.flutter/bin/flutter pub get | |
- name: Prepare Signatures | |
run: | | |
echo keyPassword=\${{ secrets.SIGNING_PASSWORD }} > ${{env.PROPERTIES_PATH}} | |
echo storePassword=\${{ secrets.SIGNING_PASSWORD }} >> ${{env.PROPERTIES_PATH}} | |
echo keyAlias=\${{ secrets.SIGNING_ALIAS }} >> ${{env.PROPERTIES_PATH}} | |
echo storeFile=key.jks >> ${{env.PROPERTIES_PATH}} | |
echo "${{ secrets.SIGNING_KEY }}" | base64 --decode > android/app/key.jks | |
- name: Build | |
run: | | |
.flutter/bin/flutter build apk --split-per-abi | |
.flutter/bin/flutter build appbundle | |
- name: Upload | |
uses: actions/[email protected] | |
with: | |
if-no-files-found: error | |
name: TraintimePDA_Android | |
path: | | |
build/app/outputs/flutter-apk/app-*-release.apk | |
build/app/outputs/bundle/release/app-release.aab |