Repository navigation
217 lines (187 loc) · 7.22 KB
/
Copy pathdeploy.yml
File metadata and controls
217 lines (187 loc) · 7.22 KB
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
name: Deploy
on:
push:
branches:
- gps-release
paths-ignore:
- "package.json"
- "CHANGELOG.md"
jobs:
version_bump:
name: "Bump version"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Bump version and push tag
uses: TriPSs/conventional-changelog-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
git-message: "chore(release): {version}"
preset: "angular"
tag-prefix: ""
output-file: "CHANGELOG.md"
deploy_android_gps:
# gps-release branch only
if: github.event_name == 'push' && github.ref == 'refs/heads/gps-release'
runs-on: ubuntu-latest
needs: version_bump
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checkout submodules
uses: actions/checkout@v2
with:
repository: Path-Check/pathcheck-mobile-resources
token: ${{ secrets.ACCESS_TOKEN }}
path: pathcheck-mobile-resources
ref: master
- name: Setup env
run: sh ./setup_env.sh ${{ secrets.HA }}
shell: bash
- name: Cache node_modules/
uses: actions/cache@v1
id: node_cache
with:
path: node_modules
key: ${{ runner.OS }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-cache-
- name: Install Node Dependencies
if: steps.node_cache.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
- name: Setup kernel for react native, increase watchers for release versions.
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Cache gradle
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up Ruby 2.6
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6
- name: Install bundler for ruby package management
run: gem install bundler -v "$(grep -A 1 "BUNDLED WITH" ./Gemfile.lock | tail -n 1)"
working-directory: ./android
- name: Cache ruby gems
uses: actions/cache@v1
id: ruby_cache
with:
path: android/vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/android/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Install Ruby Dependencies
if: steps.ruby_cache.outputs.cache-hit != 'true'
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
working-directory: ./android
- name: Decode Android key store
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
run: |
echo $SIGNING_KEY | base64 -di > keystore.jks && cp keystore.jks app/keystore.jks && mkdir $HOME/keystores && cp keystore.jks $HOME/keystores
working-directory: ./android
- name: Decode service account key
env:
GOOGLE_PLAY_STORE_SECRET: ${{ secrets.GOOGLE_PLAY_STORE_SECRET }}
run: echo $GOOGLE_PLAY_STORE_SECRET | base64 -di > json_key.json && cp json_key.json app/json_key.json
working-directory: ./android
- name: Build android Beta artifact
uses: maierj/fastlane-action@v1.4.0
env:
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
GITHUB_RUN_NUMBER: ${{ github.run_number }}
with:
lane: "release_gps"
subdirectory: "android"
bundle-install-path: "vendor/bundle"
- name: Upload to Google Play beta track
uses: maierj/fastlane-action@v1.4.0
with:
lane: "play_store_gps"
subdirectory: "android"
bundle-install-path: "vendor/bundle"
deploy_ios_gps:
# gps-release branch only
if: github.event_name == 'push' && github.ref == 'refs/heads/gps-release'
runs-on: macos-latest
needs: version_bump
steps:
- uses: actions/checkout@master
- name: Set XCode Version
run: sudo xcode-select -s /Applications/Xcode_11.5.app
- name: Cache node_modules/
uses: actions/cache@v1
id: node_cache
with:
path: node_modules
key: ${{ runner.OS }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-cache-
- name: Install Node Dependencies
if: steps.node_cache.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
- name: Install bundler for ruby package management
run: gem install bundler -v "$(grep -A 1 "BUNDLED WITH" ./Gemfile.lock | tail -n 1)"
working-directory: ./ios
- name: Cache ruby gems
uses: actions/cache@v1
id: ruby_cache
with:
path: ios/vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/ios/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Install Ruby Dependencies
if: steps.ruby_cache.outputs.cache-hit != 'true'
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
working-directory: ./ios
- name: Install Cocoapods
run: bundle exec pod install --repo-update
working-directory: ./ios
- name: Setup SSH Keys and known_hosts
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.MATCH_SSH_CERT }}"
- name: Build ios Release artifact
uses: maierj/fastlane-action@v1.4.0
# The names of the keys for secrets are specific and meaningful to Match.
# Match password is responsible for decrypting the secrets from the cert repo
# Fastlane password is responsible for interacting with the App Store to validate certificates and profiles.
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
MATCH_GIT_BASIC_AUTH: ${{ secrets.MATCH_GIT_BASIC_AUTH }}
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
with:
lane: "release"
subdirectory: "ios"
bundle-install-path: "vendor/bundle"
- name: Deploy to testflight
uses: maierj/fastlane-action@v1.4.0
# The names of the keys for secrets are specific and meaningful to Match.
# Match password is responsible for decrypting the secrets from the cert repo
# Fastlane password is responsible for interacting with the App Store to validate certificates and profiles.
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
MATCH_GIT_BASIC_AUTH: ${{ secrets.MATCH_GIT_BASIC_AUTH }}
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
with:
lane: "deploy"
subdirectory: "ios"
bundle-install-path: "vendor/bundle"