-
-
Notifications
You must be signed in to change notification settings - Fork 178
68 lines (57 loc) · 1.79 KB
/
build-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
65
66
67
68
name: Build Android
on:
release:
types: [published]
push:
branches:
- main
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.5'
- name: Decode Keystore File
env:
KEYSTORE: ${{ secrets.KEYSTORE }}
run: echo "$KEYSTORE" | base64 --decode > android/app/key.jks
- name: Create key.properties
run: |
echo "storeFile=key.jks" > android/key.properties
echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> android/key.properties
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
echo "releasePassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
echo "releaseAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
- name: Setup Flutter
run: |
flutter config --no-analytics
flutter pub get
- name: Build APK
run: |
flutter build apk --split-per-abi
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: maid-android-apk
path: build/app/outputs/apk/release
- name: Build appbundle
run: |
flutter build appbundle
- name: Upload AAB
uses: actions/upload-artifact@v4
with:
name: maid-android-aab
path: build/app/outputs/bundle/release/app-release.aab