-
Notifications
You must be signed in to change notification settings - Fork 8
71 lines (58 loc) · 2.26 KB
/
android_release.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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