-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (78 loc) · 2.48 KB
/
flutter_ci.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
81
82
83
84
85
86
87
name: Build & upload to Firebase App Distribution
on:
push:
branches-ignore:
- master
jobs:
build_apk:
name: Build Flutter (Android)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Write .env file
run: |
cd components/interface_adapters
echo $ENV | base64 -d > .env
shell: bash
env:
ENV: ${{ secrets.ENV }}
- name: Write key.properties file
run: |
echo $KEY_PROPERTIES | base64 -d > android/key.properties
shell: bash
env:
KEY_PROPERTIES: ${{ secrets.KEY_PROPERTIES }}
- name: Create keystore folder
run: mkdir -p android/keystore
- name: Write ethical_scanner_release.keystore file
env:
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
run: |
echo $RELEASE_KEYSTORE | base64 --decode > android/keystore/ethical_scanner_release.keystore
- name: Write ethical_scanner_debug.keystore file
run: |
echo $DEBUG_KEYSTORE | base64 -d > android/keystore/ethical_scanner_debug.keystore
shell: bash
env:
DEBUG_KEYSTORE: ${{ secrets.DEBUG_KEYSTORE }}
- uses: actions/setup-java@v1
with:
java-version: '17'
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- run: flutter pub get
- name: Write env.g.dart file
run: |
cd components/interface_adapters
dart run build_runner build --delete-conflicting-outputs
shell: bash
- run: flutter build apk --release
- name: Upload APK
uses: actions/upload-artifact@master
with:
name: apk-build
path: build/app/outputs/apk/release
beta_apk:
name: Upload Android Beta to Firebase App Distribution
needs: [ build_apk ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: apk-build
- name: Display structure of downloaded files
run: ls -R
- name: upload artifact to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{secrets.FIREBASE_ANDROID_APP_ID}}
token: ${{secrets.FIREBASE_TOKEN}}
groups: testers
file: app-release.apk