2022-07-06 12:17:03 +03:00
|
|
|
name: Build and release nightly APK
|
|
|
|
|
|
|
|
on:
|
2023-05-11 17:34:02 +03:00
|
|
|
workflow_dispatch:
|
2022-07-06 12:17:03 +03:00
|
|
|
schedule:
|
|
|
|
# Every nights at 4
|
|
|
|
- cron: "0 4 * * *"
|
|
|
|
|
|
|
|
env:
|
2024-07-18 11:48:11 +03:00
|
|
|
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx6g -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -XX:MaxMetaspaceSize=1g" -Dkotlin.incremental=false -XX:+UseG1GC
|
2022-08-03 17:53:27 +03:00
|
|
|
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 2 --no-daemon
|
2022-07-06 12:17:03 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
nightly:
|
|
|
|
name: Build and publish nightly Gplay APK to Firebase
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-07-15 19:12:08 +03:00
|
|
|
- uses: actions/checkout@v4
|
2022-07-06 12:17:03 +03:00
|
|
|
- name: Set up Python 3.8
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: 3.8
|
2024-10-25 11:29:16 +03:00
|
|
|
- name: Use JDK 21
|
2024-07-15 19:12:08 +03:00
|
|
|
uses: actions/setup-java@v4
|
|
|
|
with:
|
|
|
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
2024-10-25 11:29:16 +03:00
|
|
|
java-version: '21'
|
2023-01-19 14:20:16 +03:00
|
|
|
- name: Configure gradle
|
2024-07-15 19:12:08 +03:00
|
|
|
uses: gradle/actions/setup-gradle@v3
|
2022-07-06 12:17:03 +03:00
|
|
|
with:
|
2023-01-19 14:20:16 +03:00
|
|
|
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
|
2022-07-06 12:17:03 +03: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 00:39:37 +03:00
|
|
|
yes n | towncrier build --version nightly
|
2022-07-06 12:17:03 +03:00
|
|
|
- name: Build and upload Gplay Nightly APK
|
|
|
|
run: |
|
2023-10-02 14:58:51 +03:00
|
|
|
./gradlew assembleGplayNightly appDistributionUploadGplayNightly $CI_GRADLE_ARG_PROPERTIES
|
2022-07-06 12:17:03 +03: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 }}
|