-
Notifications
You must be signed in to change notification settings - Fork 11
69 lines (65 loc) · 2.28 KB
/
android-ci-linux-narch.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
name: New Arch CI on Linux
on:
workflow_dispatch:
push:
branches:
- main
paths:
- '.github/workflows/android-ci-linux.yml'
- 'android/**'
- 'src/**'
- 'yarn.lock'
- 'package.json'
pull_request:
branches:
- main
paths:
- '.github/workflows/android-ci-linux.yml'
- 'android/**'
- 'src/**'
- 'yarn.lock'
- 'package.json'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Install node_modules.
run: yarn install --frozen-lockfile
- name: Decode Google Service JSON File.
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: echo $GOOGLE_SERVICES_JSON > android/app/google-services.json
- name: Decode Sensitive JS File.
env:
SENSITIVE_JS: ${{ secrets.SENSITIVE_JS }}
run: echo $SENSITIVE_JS > src/secrets/sensitive.ts
- name: Increase Gradle JVM max memory.
run: sed -i 's/Xmx868/Xmx8096/g' android/gradle.properties && sed -i 's/300/4048/g' android/gradle.properties
- name: Enable New Arch
run: cd android && sed 's/newArchEnabled=false/newArchEnabled=true/g' gradle.properties && cd ..
- name: Clean the build.
run: cd android && ./gradlew -PnewArchEnabled=true clean --stacktrace && cd ..
- name: Build release APK.
env:
KEYPASS: ${{ secrets.KEYSTORE_PASSWORD }}
KEYALIAS: ${{ secrets.KEYSTORE_ALIAS }}
KEYALIASPASS: ${{ secrets.KEY_ALIAS_PASSWORD }}
run: cd android && ./gradlew -PnewArchEnabled=true assembleRelease --stacktrace && cd ..
- name: Build release BUNDLE.
env:
KEYPASS: ${{ secrets.KEYSTORE_PASSWORD }}
KEYALIAS: ${{ secrets.KEYSTORE_ALIAS }}
KEYALIASPASS: ${{ secrets.KEY_ALIAS_PASSWORD }}
run: cd android && ./gradlew -PnewArchEnabled=true bundleRelease --stacktrace && cd ..
- name: Upload build outputs.
uses: actions/upload-artifact@v3
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
name: Build Outputs
path: android/app/build/outputs/