Merge pull request #276 from nimblehq/release/1.12.0 #23
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 - Deploy Production build to Play Store | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build_and_deploy_android: | |
name: Android - Deploy Production build to Play Store | |
runs-on: ubuntu-latest | |
environment: production | |
timeout-minutes: 30 | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
- name: Set up Java JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: '11' | |
- name: Set up Flutter environment | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
flutter-version: '3.10.5' | |
- name: Generate new project | |
run: | | |
dart pub global activate mason_cli | |
mason get | |
mason make template -c mason-config.json | |
- name: Get Flutter dependencies | |
run: flutter pub get | |
- name: Run code generator | |
run: flutter packages pub run build_runner build --delete-conflicting-outputs | |
- name: Set up .env | |
env: | |
ENV: ${{ secrets.ENV }} | |
run: | | |
echo -e "$ENV" > .env | |
- name: Set up release signing configs | |
env: | |
ANDROID_RELEASE_KEYSTORE_BASE64: ${{ secrets.ANDROID_RELEASE_KEYSTORE_BASE64 }} | |
ANDROID_SIGNING_PROPERTIES: ${{ secrets.ANDROID_SIGNING_PROPERTIES }} | |
run: | | |
echo $ANDROID_RELEASE_KEYSTORE_BASE64 | base64 --decode > android/config/release.keystore | |
echo "$ANDROID_SIGNING_PROPERTIES" > android/signing.properties | |
- name: Build Production App Bundle | |
run: flutter build appbundle --flavor production --release --build-number $GITHUB_RUN_NUMBER | |
# TODO We will enable this step later when having a shared Service Account on our organization | |
# Basically, this step will work properly after providing a valid Service Account. | |
# - name: Upload Android Production Release bundle to Play Store | |
# uses: r0adkll/upload-google-play@v1 | |
# with: | |
# serviceAccountJson: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }} | |
# packageName: co.nimblehq.flutter.template | |
# releaseFile: build/app/outputs/bundle/productionRelease/app-production-release.aab | |
# track: internal | |
# userFraction: 1.0 | |
# whatsNewDirectory: .github/workflows/whatsnew |