2022-07-06 17:17:03 +08:00
|
|
|
name: Build and release nightly APK
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
# Every nights at 4
|
|
|
|
- cron: "0 4 * * *"
|
|
|
|
|
|
|
|
env:
|
2022-08-04 17:00:47 +08:00
|
|
|
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx2560m" -Dkotlin.incremental=false
|
2022-08-03 22:53:27 +08:00
|
|
|
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 2 --no-daemon
|
2022-07-06 17:17:03 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
nightly:
|
|
|
|
name: Build and publish nightly Gplay APK to Firebase
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Python 3.8
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: 3.8
|
2023-01-19 19:20:16 +08:00
|
|
|
- name: Configure gradle
|
|
|
|
uses: gradle/gradle-build-action@v2
|
2022-07-06 17:17:03 +08:00
|
|
|
with:
|
2023-01-19 19:20:16 +08:00
|
|
|
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
|
2022-07-06 17:17:03 +08:00
|
|
|
- name: Install towncrier
|
|
|
|
run: |
|
|
|
|
python3 -m pip install towncrier
|
|
|
|
- name: Prepare changelog file
|
|
|
|
run: |
|
|
|
|
mv towncrier.toml towncrier.toml.bak
|
|
|
|
sed 's/CHANGES\.md/CHANGES_NIGHTLY\.md/' towncrier.toml.bak > towncrier.toml
|
|
|
|
rm towncrier.toml.bak
|
2022-07-21 05:39:37 +08:00
|
|
|
yes n | towncrier build --version nightly
|
2022-07-06 17:17:03 +08:00
|
|
|
- name: Build and upload Gplay Nightly APK
|
|
|
|
run: |
|
2022-08-04 22:03:00 +08:00
|
|
|
./gradlew assembleGplayNightly appDistributionUploadGplayNightly $CI_GRADLE_ARG_PROPERTIES
|
2022-07-06 17:17:03 +08:00
|
|
|
env:
|
|
|
|
ELEMENT_ANDROID_NIGHTLY_KEYID: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_KEYID }}
|
|
|
|
ELEMENT_ANDROID_NIGHTLY_KEYPASSWORD: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_KEYPASSWORD }}
|
|
|
|
ELEMENT_ANDROID_NIGHTLY_STOREPASSWORD: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_STOREPASSWORD }}
|
|
|
|
FIREBASE_TOKEN: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_FIREBASE_TOKEN }}
|