File tree Expand file tree Collapse file tree 2 files changed +72
-0
lines changed
Expand file tree Collapse file tree 2 files changed +72
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Android Build and Release
2+
3+ on :
4+ push :
5+ paths-ignore :
6+ - ' ios/**'
7+ workflow_dispatch : # Allows manual triggering from the Actions tab
8+
9+ jobs :
10+ build :
11+ name : Build Android APKs
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout Repository
16+ uses : actions/checkout@v4
17+
18+ - name : Set up Node.js
19+ uses : actions/setup-node@v4
20+ with :
21+ node-version : ' 20.0.0'
22+ cache : ' npm'
23+
24+ - name : Set up Java
25+ uses : actions/setup-java@v4
26+ with :
27+ java-version : ' 17' # Recommended for modern React Native/Gradle versions
28+ distribution : ' zulu'
29+
30+ - name : Install Dependencies
31+ run : |
32+ npm install
33+ npm install -g react-native-cli
34+
35+ - name : Run Jetifier
36+ run : npx jetify -r
37+
38+ - name : Change wrapper permissions
39+ run : chmod +x android/gradlew
40+
41+ - name : Build DevDebug APK
42+ run : |
43+ cd android
44+ ./gradlew assembleDevDebug
45+
46+ - name : Build Debug APK
47+ run : |
48+ cd android
49+ ./gradlew assembleDebug
50+
51+ - name : Upload APKs to Release
52+ uses : softprops/action-gh-release@v2
53+ if : startsWith(github.ref, 'refs/tags/')
54+ with :
55+ files : |
56+ android/app/build/outputs/apk/dev/debug/*.apk
57+ android/app/build/outputs/apk/debug/*.apk
58+ env :
59+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 22
33** Prerequisites**
44
5+ Node setup, at least version 18.14.0:
6+ ```
7+ nvm install 18.14.0
8+ nvm use 18.14.0
9+ ```
10+
511React Native setup (from https://facebook.github.io/react-native/docs/getting-started.html )
612
7131 . install nodejs (https://nodejs.org/en/download/package-manager/ )
@@ -22,10 +28,17 @@ npm install -g react-native-cli
2228npx jetify -r
2329```
2430
31+ Ensure you have a Java Development Kit (JDK) in a version >= 17, with `` JAVA_HOME `` pointing to that JDK.
2532Change to the android/ folder and run
2633```
34+ ./gradlew assembleDevDebug
35+ ```
36+ for the ` app-dev-debug.apk ` output, or
37+ ```
2738./gradlew assembleDebug
2839```
40+ for the ` app-live-debug.apk ` output.
41+
2942The APKs will be signed using a debug key and can be found under ` android/app/build/outputs/apk/live/debug ` .
3043
3144** iOS**
You can’t perform that action at this time.
0 commit comments