-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.55 KB
/
android_deploy_production.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Android - Deploy Production build to Firebase
on:
push:
branches:
- main
jobs:
build_and_deploy_android:
name: Build & Deploy Android
runs-on: ubuntu-latest
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: 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_PRODUCTION: ${{ secrets.ENV_PRODUCTION }}
run: |
echo $ENV_PRODUCTION > .env
# 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 --debug --build-number $GITHUB_RUN_NUMBER
- name: Deploy Android Production to Firebase
uses: wzieba/[email protected]
with:
appId: ${{ secrets.FIREBASE_ANDROID_APP_ID_PRODUCTION }}
serviceCredentialsFileContent: ${{ secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON }}
groups: ${{ vars.FIREBASE_DISTRIBUTION_TESTER_GROUPS }}
file: build/app/outputs/flutter-apk/app-production-debug.apk