Skip to content

Commit 55986f0

Browse files
committed
Add CI/CD
1 parent 0da1d71 commit 55986f0

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/android_ios.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Android & iOS
2+
3+
on: [push]
4+
5+
env:
6+
RN_APP_NAME: MyApp
7+
8+
jobs:
9+
build_app:
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
new_arch_enabled: [1, 0]
14+
rn_ver: [0.72.3, 0.71.12, 0.70.13, 0.69.12] #, 0.68.7, 0.67.5, 0.66.5, 0.65.3
15+
16+
runs-on: ubuntu-22.04
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: 16
25+
26+
- name: Build Tmp React Native App
27+
env:
28+
# enable new arch for iOS
29+
RCT_NEW_ARCH_ENABLED: ${{ matrix.new_arch_enabled }}
30+
run: |
31+
cd /tmp
32+
33+
# Create new tmp React Native
34+
npx react-native@${{ matrix.rn_ver }} init $RN_APP_NAME --version ${{ matrix.rn_ver }}
35+
cd $RN_APP_NAME
36+
37+
# Install my module
38+
yarn add file:${{ github.workspace }}
39+
40+
# Debug info
41+
npx react-native info
42+
43+
# Enable new arch for Android
44+
if [[ $RCT_NEW_ARCH_ENABLED == '1' ]]; then
45+
sed -i 's/newArchEnabled=false/newArchEnabled=true/' android/gradle.properties
46+
fi
47+
48+
# Build Android App
49+
./android/gradlew assembleRelease -p android -PreactNativeArchitectures=x86_64

0 commit comments

Comments
 (0)