Skip to content

Commit d6b6f9e

Browse files
committed
add yml file
1 parent 6dcff3f commit d6b6f9e

1 file changed

Lines changed: 80 additions & 0 deletions

File tree

config.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Based on https://github.com/CircleCI-Public/circleci-demo-react-native
2+
version: 2.1
3+
jobs:
4+
node:
5+
working_directory: ~/app
6+
docker:
7+
- image: cimg/node:14.15
8+
steps:
9+
- checkout
10+
- restore_cache:
11+
key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }}
12+
- restore_cache:
13+
key: node-v1-{{ checksum "package.json" }}-{{ arch }}
14+
- run: yarn install --frozen-lockfile
15+
- save_cache:
16+
key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }}
17+
paths:
18+
- ~/.cache/yarn
19+
- save_cache:
20+
key: node-v1-{{ checksum "package.json" }}-{{ arch }}
21+
paths:
22+
- node_modules
23+
24+
- persist_to_workspace:
25+
root: ~/app
26+
paths:
27+
- node_modules
28+
29+
ios-build:
30+
working_directory: ~/app/ios
31+
macos:
32+
xcode: 13.4.1
33+
34+
steps:
35+
- checkout:
36+
path: ~/app
37+
- attach_workspace:
38+
at: ~/app
39+
- restore_cache:
40+
key: pods-v1-{{ checksum "ios/Podfile.lock" }}-{{ arch }}
41+
- run:
42+
command: pod install
43+
working_directory: ios
44+
- run:
45+
command: xcodebuild clean archive -workspace testCiCdReactNative.xcworkspace -scheme testCiCdReactNative -archivePath testCiCdReactNative.xcarchive CODE_SIGNING_ALLOWED=NO | xcpretty
46+
working_directory: ios
47+
- save_cache:
48+
key: pods-v1-{{ checksum "ios/Podfile.lock" }}-{{ arch }}
49+
paths:
50+
- ios/Pods
51+
52+
android-build:
53+
working_directory: ~/app/android
54+
docker:
55+
- image: circleci/android:api-29-node
56+
steps:
57+
- checkout:
58+
path: ~/app
59+
- attach_workspace:
60+
at: ~/app
61+
- run:
62+
name: Bundle *.aap & *.apk
63+
command: ./gradlew bundleRelease assembleRelease
64+
- store_artifacts:
65+
path: app/build/outputs/bundle/release
66+
destination: release-aab/
67+
- store_artifacts:
68+
path: app/build/outputs/apk/release
69+
destination: release-apk/
70+
71+
workflows:
72+
node-android:
73+
jobs:
74+
- node
75+
- android-build:
76+
requires:
77+
- node
78+
- ios-build:
79+
requires:
80+
- node

0 commit comments

Comments
 (0)