Skip to content

Merge pull request #276 from nimblehq/release/1.12.0 #15

Merge pull request #276 from nimblehq/release/1.12.0

Merge pull request #276 from nimblehq/release/1.12.0 #15

name: Android - Deploy Production build to Firebase
on:
push:
branches:
- main
jobs:
build_and_deploy_android:
name: Android - Deploy Production build to Firebase
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
# App Bundle requires Firebase connected to Play Store to upload https://appdistribution.page.link/KPoa
- name: Build Android apk
run: flutter build apk --flavor production --release --build-number $GITHUB_RUN_NUMBER
- name: Deploy Android Production to Firebase
uses: wzieba/[email protected]
with:
appId: ${{ vars.FIREBASE_ANDROID_APP_ID }}
serviceCredentialsFileContent: ${{ secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON }}
groups: ${{ vars.FIREBASE_DISTRIBUTION_TESTER_GROUPS }}
file: build/app/outputs/flutter-apk/app-production-release.apk