-
Notifications
You must be signed in to change notification settings - Fork 3
79 lines (79 loc) · 2.39 KB
/
ci_workflow.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
name: Default Pipeline
on: push
jobs:
Analyzer:
name: 'Run flutter analyzer'
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/[email protected]
with:
channel: 'stable'
- run: flutter pub get
- run: flutter analyze
Tests:
name: 'Run flutter tests'
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/[email protected]
with:
channel: 'stable'
- run: flutter pub get
- run: flutter test
Build_Testing:
environment: testing
if: github.ref == 'refs/heads/testing'
name: 'Build APK for Testing'
needs:
- Analyzer
- Tests
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: subosito/[email protected]
- name: 'Build Testing APK'
uses: subosito/[email protected]
with:
channel: 'stable'
- run: flutter build apk
- uses: actions/[email protected]
with:
name: testing-apk
path: build/app/outputs/flutter-apk/app-release.apk
Build_aab:
environment: stable
if: github.ref == 'refs/heads/stable'
name: 'Build Signed AAB for Production'
needs:
- Analyzer
- Tests
runs-on: ubuntu-latest
env:
PROPERTIES_PATH: "./android/key.properties"
steps:
- uses: actions/[email protected]
- uses: subosito/[email protected]
- name: 'Build Production AAB'
uses: subosito/[email protected]
with:
channel: 'stable'
- run: |
echo keyPassword=\${{ secrets.KEY_PASSWORD }} > ${{env.PROPERTIES_PATH}}
echo storePassword=\${{ secrets.KEY_STORE_PASSWORD }} >> ${{env.PROPERTIES_PATH}}
echo keyAlias=\${{ secrets.ALIAS }} >> ${{env.PROPERTIES_PATH}}
echo storeFile=\${{ secrets.STORE_FILE }} >> ${{env.PROPERTIES_PATH}}
- run: echo "${{ secrets.KEYSTORE }}" | base64 --decode > android/app/key.jks
- run: flutter build appbundle
- uses: actions/[email protected]
with:
name: appbundle
path: build/app/outputs/bundle/release