-
Notifications
You must be signed in to change notification settings - Fork 21
47 lines (45 loc) · 2.28 KB
/
build-android.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
name: Build Clerotri for Android (debug)
on:
push:
jobs:
build-android-debug:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Enable Corepack
run: corepack enable
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'microsoft'
cache: gradle
- name: Install dependencies and prepare assets
run: yarn install && npx react-native-asset && yarn license-list
- name: Bundle the JS
run: yarn react-native rnx-bundle
- name: Move the assets
run: mkdir -p android/app/build/generated/assets/createBundleDebugJsAndAssets && mkdir -p android/app/build/generated/res/createBundleDebugJsAndAssets && cp dist/android/index.android.bundle.hbc android/app/build/generated/assets/createBundleDebugJsAndAssets/index.android.bundle && cp -r dist/android/res android/app/build/generated/res/createBundleDebugJsAndAssets
- name: Build the app
run: yarn react-native build-android --tasks assembleDebug
- name: Rename debug APKs
run: |
mv app-arm64-v8a-debug.apk Clerotri-Debug-${{ github.sha }}-arm64-v8a.apk
mv app-armeabi-v7a-debug.apk Clerotri-Debug-${{ github.sha }}-armeabi-v7a.apk
mv app-x86_64-debug.apk Clerotri-Debug-${{ github.sha }}-x86_64.apk
mv app-x86-debug.apk Clerotri-Debug-${{ github.sha }}-x86.apk
working-directory: /home/runner/work/clerotri/clerotri/android/app/build/outputs/apk/debug/
- name: Upload debug APKs
uses: actions/upload-artifact@v4
with:
path: |
/home/runner/work/Clerotri/Clerotri/android/app/build/outputs/apk/debug/Clerotri-Debug-${{ github.sha }}-arm64-v8a.apk
/home/runner/work/Clerotri/Clerotri/android/app/build/outputs/apk/debug/Clerotri-Debug-${{ github.sha }}-armeabi-v7a.apk
/home/runner/work/Clerotri/Clerotri/android/app/build/outputs/apk/debug/Clerotri-Debug-${{ github.sha }}-x86_64.apk
/home/runner/work/Clerotri/Clerotri/android/app/build/outputs/apk/debug/Clerotri-Debug-${{ github.sha }}-x86.apk