android_release #4
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: workflow_dispatch | |
jobs: | |
build-and-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up JDK 11. | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: temurin | |
- name: Checkout design_system_flutter code. | |
uses: actions/checkout@v4 | |
- name: Write Keystore from base64 encoded secret. | |
id: write_keystore | |
uses: timheuer/[email protected] | |
with: | |
fileName: "fdsm_keystore.jks" | |
fileDir: "./example/android/app/keys" | |
encodedString: ${{ secrets.KEYSTORE_64 }} | |
- name: Parse flutter version and channel specified in .fvm into env vars. | |
uses: kuhnroyal/flutter-fvm-config-action@v1 | |
- name: Clone flutter version specified in .fvm. | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }} | |
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }} | |
- name: Run flutter doctor. | |
run: flutter doctor -v | |
- name: Install dependencies. | |
run: flutter pub get | |
working-directory: example | |
- name: Build appbundle. | |
run: flutter build appbundle --no-pub | |
working-directory: example | |
env: | |
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
KEY_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | |
- name: Create Signing Report. | |
run: ./gradlew signingReport | |
working-directory: example/android | |
- name: Upload appbundle as artifact. | |
uses: actions/upload-artifact@v3 | |
with: | |
name: app-release.aab | |
path: example/build/app/outputs/bundle/release/ | |
retention-days: 1 | |
- name: Write Google SA json from base64 encoded secret. | |
id: write_google_sa | |
uses: timheuer/[email protected] | |
with: | |
fileName: "gp_service_account.json" | |
fileDir: "./example/android/app/keys" | |
encodedString: ${{ secrets.GOOGLE_PLAYSTORE_SERVICE_ACCOUNT_64 }} | |
- name: Release using GPP. | |
run: ./gradlew publishBundle --artifact-dir ../build/app/outputs/bundle/release/ | |
working-directory: example/android |