Skip to content

Commit 7f70186

Browse files
committed
Add build example app workflow
1 parent 90b6cb3 commit 7f70186

File tree

2 files changed

+106
-1
lines changed

2 files changed

+106
-1
lines changed
+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Build Example App
2+
3+
on:
4+
push:
5+
tags:
6+
- "v[0-9]+.[0-9]+.[0-9]+"
7+
8+
jobs:
9+
apk:
10+
name: Build Android APK
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup JDK 18
19+
uses: actions/setup-java@v4
20+
with:
21+
java-version: 18
22+
distribution: temurin
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: '20'
28+
29+
- name: Install dependencies
30+
run: |
31+
yarn install
32+
cd example
33+
yarn install
34+
35+
- name: Clean generated builds
36+
run: |
37+
cd example
38+
rm -rf android/app/build/generated/
39+
40+
- name: Gradle build APK
41+
run: |
42+
cd example
43+
cd android
44+
chmod +x gradlew
45+
./gradlew app:assembleRelease
46+
47+
- name: Release APK
48+
uses: softprops/action-gh-release@v2
49+
if: startsWith(github.ref, 'refs/tags/')
50+
with:
51+
files: example/android/app/build/outputs/apk/release/*.apk
52+
53+
ipa:
54+
runs-on: macos-14
55+
name: Build iOS IPA
56+
permissions:
57+
contents: write
58+
steps:
59+
- name: Checkout
60+
uses: actions/checkout@v4
61+
62+
- name: Setup Node.js
63+
uses: actions/setup-node@v4
64+
with:
65+
node-version: "20"
66+
67+
- name: Install dependencies
68+
run: |
69+
yarn install
70+
cd example
71+
yarn install
72+
73+
- name: pod Install
74+
run: |
75+
cd example
76+
cd ios
77+
rm Podfile.lock
78+
pod install --repo-update
79+
80+
- name: Create Example Workspace
81+
run: |
82+
cd example
83+
cd ios
84+
cp -r GetRandomValuesExample.xcworkspace example.xcworkspace
85+
86+
- name: Xcode build
87+
run: |
88+
cd example
89+
cd ios
90+
xcodebuild -scheme GetRandomValuesExample -workspace example.xcworkspace -configuration Release clean archive -archivePath "build/GetRandomValuesExample.xcarchive" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
91+
92+
- name: Archive to IPA
93+
run: |
94+
cd example
95+
cd ios
96+
mkdir build/Payload
97+
mv build/GetRandomValuesExample.xcarchive/Products/Applications/GetRandomValuesExample.app build/Payload/GetRandomValuesExample.app
98+
cd build
99+
zip -r GetRandomValuesExample.ipa Payload/
100+
101+
- name: Release IPA
102+
uses: softprops/action-gh-release@v2
103+
if: startsWith(github.ref, 'refs/tags/')
104+
with:
105+
files: example/ios/build/GetRandomValuesExample.ipa

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: CI, Lint and Typecheck
22
on:
33
push:
44
branches:

0 commit comments

Comments
 (0)