-
Notifications
You must be signed in to change notification settings - Fork 102
159 lines (141 loc) · 4.59 KB
/
deploy_beta.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
name: DEPLOY_BETA
on:
push:
tags:
- 'v*-beta'
jobs:
build_ed25519:
name: Build dependent library
runs-on: self-hosted
steps:
- uses: actions/checkout@master
with:
repository: appditto/flutter_nano_ffi
ref: refs/heads/master
- name: Run cmake
working-directory: android
run: |
cmake .
make
- name: Upload artifact
if: success()
uses: actions/upload-artifact@v1
with:
name: libraries
path: android/libed25519_blake2b.dylib
run_tests:
name: Run tests
needs: build_ed25519
runs-on: self-hosted
steps:
- uses: actions/checkout@master
- name: Download library
uses: actions/download-artifact@v2
- name: Set workspace in env
run: echo "workspace=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: Run tests
env:
ED215519_SO_FILE: ${{ env.workspace }}/libraries/libed25519_blake2b.dylib
run: |
flutter pub get
flutter test
build_android:
name: Build android app
needs: run_tests
runs-on: self-hosted
steps:
- uses: actions/checkout@master
- name: Build artifacts
working-directory: android
env:
ED215519_SO_FILE: /Users/adapps/flutter_nano_ffi/android/libed25519_blake2b.dylib
FLUTTER_PATH: /Users/adapps/flutter
ANDROID_SDK_PATH: /Users/adapps/Library/Android/Sdk
GEM_HOME: ~/.gems
run: |
echo flutter.sdk=${{ env.FLUTTER_PATH }} > local.properties
echo sdk.dir=${{ env.ANDROID_SDK_PATH }} >> local.properties
echo flutter.buildMode=release >> local.properties
echo storeFile=${{ secrets.ANDROID_KEYSTORE_PATH }} > key.properties
echo keyAlias=${{ secrets.ANDROID_KEY_ALIAS }} >> key.properties
echo keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }} >> key.properties
echo storePassword=${{ secrets.ANDROID_KEY_STORE_PASSWORD }} >> key.properties
/usr/local/bin/fastlane build_android production:true
rm -f key.properties
- name: Upload APK
if: success()
uses: actions/upload-artifact@v1
with:
name: android-apk
path: build/app/outputs/apk/release/app-release.apk
- name: Upload Bundle
if: success()
uses: actions/upload-artifact@v1
with:
name: android-aab
path: build/app/outputs/bundle/release/app-release.aab
build_ios:
name: Build iOS app
needs: run_tests
runs-on: self-hosted
steps:
- uses: actions/checkout@master
- name: Build artifacts
working-directory: ios
env:
ED215519_SO_FILE: /Users/adapps/flutter_nano_ffi/android/libed25519_blake2b.dylib
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
TEMP_KEYCHAIN_NAME: ${{ secrets.TEMP_KEYCHAIN_NAME }}
TEMP_KEYCHAIN_PASSWORD: ${{ secrets.TEMP_KEYCHAIN_PASSWORD }}
GEM_HOME: ~/.gems
run: |
/usr/local/bin/fastlane build_ios
- name: Upload IPA
if: success()
uses: actions/upload-artifact@v1
with:
name: ios-ipa
path: ios/Runner.ipa
deploy_android:
name: Deploy android internal
needs: build_android
runs-on: self-hosted
steps:
- uses: actions/checkout@master
- name: Download AAB
uses: actions/download-artifact@v2
with:
name: android-aab
- name: Set workspace in env
run: echo "workspace=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: Deploy android
if: success()
working-directory: android
env:
AAB_PATH: ${{ env.workspace }}/app-release.aab
GEM_HOME: ~/.gems
run: |
/usr/local/bin/fastlane deploy_android internal:true
deploy_ios:
name: Deploy iOS testflight
needs: build_ios
runs-on: self-hosted
steps:
- uses: actions/checkout@master
- name: Download IPA
uses: actions/download-artifact@v2
with:
name: ios-ipa
- name: Set workspace in env
run: echo "workspace=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: Deploy iOS
if: success()
working-directory: ios
env:
IPA_PATH: ${{ env.workspace }}/Runner.ipa
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
GEM_HOME: ~/.gems
run: |
/usr/local/bin/fastlane deploy_ios testflight:true