-
Notifications
You must be signed in to change notification settings - Fork 32
145 lines (126 loc) · 3.74 KB
/
build.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: Build
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
on:
workflow_dispatch: {}
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
branches:
- main
- develop
paths-ignore:
- "**.md"
- doc/**
- .git/
- .vscode/
- "**.txt"
permissions:
checks: write
contents: read
jobs:
build_android:
name: Build Android App
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 15
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 15.x
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
run: |
cd packages/react-native-hms/
npm install
cd example/
npm install
cd ../../react-native-room-kit/
npm install
cd example/
npm install
- name: Publish Dry Run
run: |
cd packages/react-native-hms/ && npm publish --dry-run
cd ../react-native-room-kit/ && npm publish --dry-run
- name: Make Gradlew Executable
run: cd packages/react-native-room-kit/example/android && chmod +x ./gradlew
- name: Build Android App
run: |
cd packages/react-native-room-kit/example/android
./gradlew assembleRelease --no-daemon
build_ios:
name: Build iOS App
if: github.event.pull_request.draft == false
runs-on: macOS-latest
timeout-minutes: 45
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 15
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 15.x
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Install dependencies
run: |
cd packages/react-native-hms/
npm install
cd example/
npm install
cd ../../react-native-room-kit/
npm install
cd example/
npm install
- name: Cache Pods
id: cache-pods
uses: actions/cache@v3
with:
path: packages/react-native-room-kit/example/ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Install Pods if Cache Missed
if: steps.cache-pods.outputs.cache-hit != 'true'
run: |
sudo gem install cocoapods
cd ./packages/react-native-room-kit/example/ios
pod install
- name: Build iOS App
uses: yukiarrr/[email protected]
with:
project-path: packages/react-native-room-kit/example/ios/RNExample.xcodeproj
p12-base64: ${{ secrets.IOS_P12_BASE64 }}
certificate-password: ${{ secrets.IOS_CERTIFICATE_PASSWORD }}
mobileprovision-base64: |
${{ secrets.ADHOC_MOBILEPROVISION_BASE64 }}
${{ secrets.ADHOCEXTENSION_MOBILEPROVISION_BASE64 }}
code-signing-identity: iPhone Distribution
team-id: ${{ secrets.IOS_TEAM_ID }}
workspace-path: packages/react-native-room-kit/example/ios/RNExample.xcworkspace
scheme: RNExample
export-method: ad-hoc
export-options: packages/react-native-room-kit/example/ios/ExportOptions.plist