Skip to content

Commit 223ac1b

Browse files
author
Krzysztof
authored
chore: Semantic release setup (#470)
1 parent fdf46d4 commit 223ac1b

File tree

4 files changed

+2753
-76
lines changed

4 files changed

+2753
-76
lines changed

.circleci/config.yml

+15-9
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ jobs:
220220
command: |
221221
brew bundle --file=.circleci/Brewfile.android --no-lock
222222
- save-cache: *cache_save_brew_android
223-
224223
- run:
225224
name: Install Android emulator
226225
shell: /bin/bash -e
@@ -231,15 +230,13 @@ jobs:
231230
yes | sdkmanager "build-tools;28.0.3" 1> /dev/null
232231
yes | sdkmanager --licenses 1> /dev/null
233232
yes | sdkmanager --list
234-
235233
- run:
236234
name: ADB start/stop
237235
command: |
238236
adb start-server
239237
adb devices
240238
adb kill-server
241239
ls -la ~/.android
242-
243240
- run:
244241
name: Create emulator
245242
command: |
@@ -249,9 +246,6 @@ jobs:
249246
-k "system-images;android-21;google_apis;x86" \
250247
-g "google_apis" \
251248
-d "Nexus 4"
252-
253-
254-
255249
- run:
256250
name: Start emulator in background
257251
background: true
@@ -266,20 +260,25 @@ jobs:
266260
-no-boot-anim \
267261
-no-window \
268262
-logcat '*:W' | grep -i "ReactNative"
269-
270263
- run:
271264
name: Wait for emulator to boot
272265
command: yarn build:e2e:android
273-
274266
- run:
275267
name: Wake device
276268
command: |
277269
adb shell input keyevent 82
278-
279270
- run:
280271
name: Run e2e tests
281272
command: yarn test:e2e:android
282273

274+
Release:
275+
<<: *js_defaults
276+
steps:
277+
- *addWorkspace
278+
- run:
279+
name: Release new version
280+
command: yarn semantic-release
281+
283282
# ==============================
284283
# WORK FLOWS
285284
# ==============================
@@ -302,6 +301,13 @@ workflows:
302301
requires:
303302
- "Test: lint"
304303
- "Test: flow"
304+
- "Release":
305+
requires:
306+
- "Test: iOS e2e"
307+
- "Build: Android release apk"
308+
filters:
309+
branches:
310+
only: master
305311
# - "Test: Android e2e":
306312
# requires:
307313
# - "Test: lint"

.releaserc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"branches": [
3+
"master"
4+
]
5+
}

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@
8383
"react-native-macos": "0.60.0-microsoft.50",
8484
"react-native-web": "~0.12.0",
8585
"react-native-windows": "0.61.0",
86-
"react-test-renderer": "16.9.0"
86+
"react-test-renderer": "16.9.0",
87+
"semantic-release": "^17.2.1"
8788
},
8889
"jest": {
8990
"preset": "react-native",

0 commit comments

Comments
 (0)