-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (50 loc) · 1.63 KB
/
flutter-android.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
name: Build and Deploy App Bundle
on:
push:
branches:
- main
jobs:
build:
name: Build Flutter App Bundle
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Java 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.24.4'
- name: Install dependencies
run: flutter pub get
- name: Decode and write google-services.json
run: |
echo "${{ secrets.GOOGLE_SERVICES_JSON }}" | base64 --decode > android/app/google-services.json
- name: Decode and add the signing key
run: |
echo "${{ secrets.MY_RELEASE_KEY }}" | base64 --decode > android/app/my-release-key.jks
- name: Debug keystore
run: |
ls -la android/app
- name: Set up environment for signing
run: |
echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" >> android/key.properties
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
echo "storeFile=my-release-key.jks" >> android/key.properties
- name: Debug key properties
run: |
ls -la android/
- name: Clean Flutter build
run: flutter clean
- name: Build app bundle
run: flutter build appbundle --release
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: app-release.aab
path: build/app/outputs/bundle/release/app-release.aab