Merge pull request #19 from MoonMeet/alpha #73
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |