Skip to content

Commit c7befde

Browse files
committed
feat: build ios & android apps on CI
1 parent 0ca5f66 commit c7befde

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed

.github/workflows/build.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Build Android and iOS
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
android:
11+
name: Build Android App
12+
runs-on: ubuntu-latest
13+
14+
env:
15+
SKIP_YARN_COREPACK_CHECK: 0
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Setup Java 17
21+
uses: actions/setup-java@v3
22+
with:
23+
distribution: 'zulu'
24+
java-version: 17
25+
cache: 'gradle'
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: 'lts/*'
31+
cache: 'yarn'
32+
33+
- name: Install root dependencies
34+
run: yarn install
35+
36+
- name: Install example dependencies
37+
run: |
38+
cd example
39+
yarn install
40+
cd ..
41+
42+
- name: Setup Android SDK
43+
uses: android-actions/setup-android@v2
44+
45+
- name: Build Android App
46+
run: |
47+
cd example/kotlin
48+
chmod +x ./gradlew
49+
./gradlew assembleDebug
50+
51+
ios:
52+
name: Build iOS App
53+
runs-on: macos-latest
54+
55+
env:
56+
SKIP_YARN_COREPACK_CHECK: 0
57+
58+
steps:
59+
- uses: actions/checkout@v3
60+
61+
- name: Setup Node.js
62+
uses: actions/setup-node@v3
63+
with:
64+
node-version: 'lts/*'
65+
cache: 'yarn'
66+
67+
- name: Setup Ruby
68+
uses: ruby/setup-ruby@v1
69+
with:
70+
ruby-version: '3.2'
71+
bundler-cache: true
72+
73+
- name: Install root dependencies
74+
run: yarn install
75+
76+
- name: Install example dependencies
77+
run: |
78+
cd example
79+
yarn install
80+
cd ..
81+
82+
- name: Install pods
83+
run: |
84+
cd example/swift
85+
pod install
86+
87+
- name: Build iOS App
88+
run: |
89+
cd example/swift
90+
xcodebuild -workspace SwiftExample.xcworkspace -scheme SwiftExample -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 15' build CODE_SIGNING_ALLOWED=NO

0 commit comments

Comments
 (0)