Build & Deploy Android Production to Google Play store #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 & Deploy Android Production to Google Play store | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: JSON to variables | |
uses: antifree/[email protected] | |
with: | |
filename: 'config/release_version.json' | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.16.2' | |
channel: 'stable' | |
cache: true | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Configure Keystore | |
run: | | |
echo "$PLAY_STORE_UPLOAD_KEY" | base64 --decode > app/upload-keystore.jks | |
echo "storeFile=upload-keystore.jks" >> key.properties | |
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> key.properties | |
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> key.properties | |
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> key.properties | |
env: | |
PLAY_STORE_UPLOAD_KEY: ${{ secrets.KEYSTORE }} | |
KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
KEYSTORE_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }} | |
working-directory: android | |
- name: Build abb release file | |
run: flutter build appbundle --flavor prod --target lib/main.dart --build-name ${{ env.VersionName }} --build-number ${{github.run_number}} | |
- name: Upload to Play Store (Internal Testing) | |
uses: r0adkll/[email protected] | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_JSON }} | |
packageName: com.axonivy | |
releaseFiles: build/app/outputs/bundle/prodRelease/app-prod-release.aab | |
mappingFile: ./build/app/outputs/mapping/prodRelease/mapping.txt | |
track: internal |