Android Release #3
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: Android Release | |
on: | |
push: | |
# Pattern matched against refs/tags | |
tags: | |
- "*" | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Create Android Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download Android keystore | |
id: android_keystore | |
uses: timheuer/[email protected] | |
with: | |
fileName: upload-keystore.jks | |
encodedString: ${{ secrets.KEYSTORE }} | |
- name: Create key.properties | |
run: | | |
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties | |
echo "storePassword=${{ secrets.SIGNING_STORE_PASSWORD }}" >> android/key.properties | |
echo "keyPassword=${{ secrets.SIGNING_KEY_PASSWORD }}" >> android/key.properties | |
echo "keyAlias=${{ secrets.SIGNING_KEY_ALIAS }}" >> android/key.properties | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: "zulu" | |
java-version: "12.x" | |
cache: gradle | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: "stable" | |
cache: true | |
- name: Get dependencies | |
run: flutter pub get | |
- name: Build Android Release APK | |
run: flutter build apk --flavor prod --no-tree-shake-icons | |
- name: Create GitHub Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: build/app/outputs/flutter-apk/app-prod-release.apk | |
token: ${{ secrets.GITHUB_TOKEN }} | |
generateReleaseNotes: true | |
makeLatest: true | |
bodyFile: "body.md" | |
- name: Create Android release appbundle | |
run: flutter build appbundle --flavor prod --no-tree-shake-icons | |
- name: Upload Android Release | |
uses: actions/upload-artifact@v2 | |
with: | |
name: android-release | |
path: build/app/outputs/bundle/prodRelease/app-prod-release.aab | |
deploy: | |
name: Deploy Android Build | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get Android Build from artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: android-release | |
- name: Release Build to internal track | |
uses: r0adkll/upload-google-play@v1 | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }} | |
packageName: dev.hemanths.paisa | |
releaseFiles: build/app/outputs/bundle/prodRelease/app-prod-release.aab | |
track: internal | |
status: completed | |
inAppUpdatePriority: 5 |