android_release #6
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: | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
cache: "gradle" | |
- 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: Clone flutter version specified in .fvm. | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
- 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 |