Skip to content

New Version 0.2.1

New Version 0.2.1 #21

Workflow file for this run

name: android build
on:
push:
tags: v**
# https://medium.com/steeple-product/ci-cd-for-a-flutter-app-with-github-actions-android-release-and-deployment-dca7e787ca26
jobs:
build:
runs-on: ubuntu-latest
environment: android
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.13.2"
channel: "stable"
cache: true
- uses: actions/setup-go@v4
with:
go-version: "^1.21.0"
- uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "11"
cache: "gradle"
- name: compile mage
run: go mod download && go run magefiles/cmd/mage.go -compile ../mage
- name: display telemetry
run: flutter --disable-telemetry
- name: Install dependencies
run: ./mage PubGlobalUpgrade PubGet CreateI18nSynthetic BuildRunner CreateVersion CreateI18n
- name: Retrieve base64 keystore and decode it to a file
env:
KEYSTORE_BASE64: ${{secrets.KEYSTORE_FILE_BASE64}}
run: |
echo "$KEYSTORE_BASE64" | base64 -i -d > "${{github.workspace}}/android-keystore.jks"
- name: "Create 'key.properties' file"
env:
KEYSTORE_PROPERTIES_PATH: ${{github.workspace}}/android/key.properties
run: |
echo 'storeFile=${{github.workspace}}/android-keystore.jks' > $KEYSTORE_PROPERTIES_PATH
echo 'keyAlias=${{secrets.KEYSTORE_KEY_ALIAS}}' >> $KEYSTORE_PROPERTIES_PATH
echo 'storePassword=${{secrets.KEYSTORE_PASSWORD}}' >> $KEYSTORE_PROPERTIES_PATH
echo 'keyPassword=${{secrets.KEYSTORE_KEY_PASSWORD}}' >> $KEYSTORE_PROPERTIES_PATH
- name: Build APK
run: flutter build apk --flavor prod
- name: Build AppBundle
run: flutter build appbundle --flavor prod
- name: Keep apk
uses: actions/upload-artifact@v3
with:
name: android apk
path: ${{github.workspace}}/build/app/outputs/flutter-apk/app-prod-release.apk
- name: Keep appbundle
uses: actions/upload-artifact@v3
with:
name: android appbundle
path: ${{github.workspace}}/build/app/outputs/bundle/prodRelease/app-prod-release.aab
- name: Upload Android
uses: r0adkll/[email protected]
with:
packageName: docscan.fiurthorn.software.prod
track: internal
status: draft
releaseFiles: ${{github.workspace}}/build/app/outputs/bundle/prodRelease/app-prod-release.aab
serviceAccountJsonPlainText: "${{secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_KEY_JSON}}"
mappingFile: ${{github.workspace}}/build/app/outputs/mapping/prodRelease/mapping.txt
debugSymbols: ${{github.workspace}}/build/app/intermediates/merged_native_libs/prodRelease/out/lib