-
Notifications
You must be signed in to change notification settings - Fork 21
80 lines (67 loc) · 2.24 KB
/
aab.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
72
73
74
75
76
77
78
79
80
name: AAB
on:
push:
branches: [release]
jobs:
linter:
runs-on: ubuntu-latest
name: Lint flutter code
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.5'
- run: bash -x ./flutter-init.sh
- run: cp -f ./src/ui/flutter_app/analysis_options.yaml ./
- name: Analyze Flutter
uses: ValentinVignal/action-dart-analyze@v0.15
with:
fail-on: 'format'
working-directory: src/ui/flutter_app
build:
runs-on: ubuntu-latest
needs: linter
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- run: echo $SIGNING_KEY | base64 -d > src/ui/flutter_app/android/app/key.jks
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.5'
- name: Export environment valuables
run: export
- name: Create App version
run: git fetch --tags; git tag; git log -n1; bash -x ./version.sh
- name: Print Flutter SDK version
run: flutter --version
- name: Install dependencies
run: bash -x ./flutter-init.sh
# Build
- name: Build apk
run: cd src/ui/flutter_app; rm android/app/build.gradle; mv android/app/build.gradle_github android/app/build.gradle; flutter build apk -v; flutter build appbundle -v
env:
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
ALIAS: ${{ secrets.ALIAS }}
KEY_PATH: key.jks
# Archive apk
- name: Archive apk
uses: actions/upload-artifact@v3
with:
name: sanmill-flutter-apk-release
path: src/ui/flutter_app/build/app/outputs/flutter-apk/app-release.apk
# Archive aab
- name: Archive aab
uses: actions/upload-artifact@v3
with:
name: sanmill-flutter-aab-release
path: src/ui/flutter_app/build/app/outputs/bundle/release/app-release.aab