-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.yml
80 lines (75 loc) · 2.13 KB
/
config.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
# Based on https://github.com/CircleCI-Public/circleci-demo-react-native
version: 2.1
jobs:
node:
working_directory: ~/app
docker:
- image: cimg/node:14.15
steps:
- checkout
- restore_cache:
key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }}
- restore_cache:
key: node-v1-{{ checksum "package.json" }}-{{ arch }}
- run: yarn install --frozen-lockfile
- save_cache:
key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }}
paths:
- ~/.cache/yarn
- save_cache:
key: node-v1-{{ checksum "package.json" }}-{{ arch }}
paths:
- node_modules
- persist_to_workspace:
root: ~/app
paths:
- node_modules
ios-build:
working_directory: ~/app/ios
macos:
xcode: 13.4.1
steps:
- checkout:
path: ~/app
- attach_workspace:
at: ~/app
- restore_cache:
key: pods-v1-{{ checksum "ios/Podfile.lock" }}-{{ arch }}
- run:
command: pod install
working_directory: ios
- run:
command: xcodebuild clean archive -workspace testCiCdReactNative.xcworkspace -scheme testCiCdReactNative -archivePath testCiCdReactNative.xcarchive CODE_SIGNING_ALLOWED=NO | xcpretty
working_directory: ios
- save_cache:
key: pods-v1-{{ checksum "ios/Podfile.lock" }}-{{ arch }}
paths:
- ios/Pods
android-build:
working_directory: ~/app/android
docker:
- image: circleci/android:api-29-node
steps:
- checkout:
path: ~/app
- attach_workspace:
at: ~/app
- run:
name: Bundle *.aap & *.apk
command: ./gradlew bundleRelease assembleRelease
- store_artifacts:
path: app/build/outputs/bundle/release
destination: release-aab/
- store_artifacts:
path: app/build/outputs/apk/release
destination: release-apk/
workflows:
node-android:
jobs:
- node
- android-build:
requires:
- node
- ios-build:
requires:
- node