-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (68 loc) · 2.13 KB
/
Copy pathbuild_android.yaml
File metadata and controls
85 lines (68 loc) · 2.13 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
name: Build Android App
on: [push]
env:
RN_APP_NAME: MyApp
jobs:
link_android:
name: Lint Android
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Setup Java 19
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 19
- name: Setup Node.js 22
uses: actions/setup-node@v6
with:
node-version: 24
- run: yarn install
- run: yarn lint:android
build_app:
name: Build RN@${{ matrix.rn_ver }}-${{ matrix.new_arch_enabled }}
strategy:
fail-fast: false
matrix:
new_arch_enabled: [1, 0]
rn_ver: [0.84.1, 0.83.4, 0.82.1, 0.81.6, 0.80.3, 0.79.7, 0.78.3]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Setup Java 19
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 19
- name: Setup Node.js 22
uses: actions/setup-node@v6
with:
node-version: 24
- name: Build Tmp React Native App
env:
# enable new arch for iOS
RCT_NEW_ARCH_ENABLED: ${{ matrix.new_arch_enabled }}
run: |
cd /tmp
# Create new tmp React Native
npx @react-native-community/cli@latest init $RN_APP_NAME --version ${{ matrix.rn_ver }}
cd $RN_APP_NAME
# Install my module
yarn add file:${{ github.workspace }}
# Debug info
npx react-native info
# Enable new arch for Android
if [[ $RCT_NEW_ARCH_ENABLED == '1' ]]; then
sed -i 's/newArchEnabled=false/newArchEnabled=true/' android/gradle.properties
./android/gradlew generateCodegenArtifactsFromSchema -p android
else
sed -i 's/newArchEnabled=true/newArchEnabled=false/' android/gradle.properties
fi
# Build Android App
./android/gradlew assembleRelease -p android -PreactNativeArchitectures=x86_64