Some checks failed
renovate/stability-days Updates have met minimum release age requirement
APK Build / Build APKs (pull_request) Failing after 1s
APK Build / Build APKs-1 (pull_request) Failing after 1s
APK Build / Build APKs-2 (pull_request) Failing after 1s
Enterprise APK Build / Build Enterprise APKs (pull_request) Has been skipped
Enterprise APK Build / Build Enterprise APKs-1 (pull_request) Has been skipped
Enterprise APK Build / Build Enterprise APKs-2 (pull_request) Has been skipped
Danger CI / Danger main check (pull_request) Has been skipped
Maestro (local) / Build APK (pull_request) Failing after 1s
Maestro (local) / Maestro test suite (pull_request) Has been skipped
Code Quality Checks / Search for forbidden patterns (pull_request) Failing after 1s
Code Quality Checks / Search for invalid screenshot files (pull_request) Failing after 1s
Code Quality Checks / Search for invalid dependencies (pull_request) Failing after 1s
Code Quality Checks / Konsist tests (pull_request) Failing after 1s
Code Quality Checks / Compose tests (pull_request) Failing after 1s
Code Quality Checks / Android lint check (pull_request) Failing after 1s
Code Quality Checks / Detekt checks (pull_request) Failing after 1s
Code Quality Checks / Ktlint checks (pull_request) Failing after 1s
Code Quality Checks / Doc checks (pull_request) Failing after 1s
Code Quality Checks / Check shell scripts (pull_request) Failing after 1s
Code Quality Checks / Run zizmor (pull_request) Failing after 1s
Sonar / Sonar Quality Checks (pull_request) Failing after 1s
Test / Runs unit tests (pull_request) Failing after 1s
Validate Git LFS / Validate (pull_request) Failing after 1s
Community PR notice / Welcome comment (pull_request_target) Has been skipped
Code Quality Checks / Project Check Suite (pull_request) Has been skipped
66 lines
3.4 KiB
YAML
66 lines
3.4 KiB
YAML
name: Build and release nightly application
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
# Every nights at 4
|
|
- cron: "0 4 * * *"
|
|
|
|
permissions: {}
|
|
|
|
env:
|
|
GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx8g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -XX:+UseG1GC -Dkotlin.daemon.jvm.options=-Xmx4g
|
|
CI_GRADLE_ARG_PROPERTIES: --stacktrace --no-daemon -Dsonar.gradle.skipCompile=true --no-configuration-cache
|
|
|
|
jobs:
|
|
nightly:
|
|
name: Build and publish nightly bundle to Firebase
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.repository == 'element-hq/element-x-android' }}
|
|
steps:
|
|
- name: Free Disk Space (Ubuntu)
|
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
|
with:
|
|
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
|
tool-cache: true
|
|
# All of these default to true, but we should only need the 'android' one (and maybe swap-storage?)
|
|
android: false
|
|
dotnet: true
|
|
haskell: true
|
|
# This takes way too long to run (~2 minutes) and it saves only ~5.5GB
|
|
large-packages: false
|
|
docker-images: true
|
|
swap-storage: false
|
|
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
persist-credentials: false
|
|
- name: Use JDK 21
|
|
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
|
with:
|
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
|
java-version: '21'
|
|
- name: Build and upload Nightly application
|
|
run: |
|
|
./gradlew assembleGplayNightly appDistributionUploadGplayNightly $CI_GRADLE_ARG_PROPERTIES
|
|
env:
|
|
ELEMENT_ANDROID_MAPTILER_API_KEY: ${{ secrets.MAPTILER_KEY }}
|
|
ELEMENT_ANDROID_MAPTILER_LIGHT_MAP_ID: ${{ secrets.MAPTILER_LIGHT_MAP_ID }}
|
|
ELEMENT_ANDROID_MAPTILER_DARK_MAP_ID: ${{ secrets.MAPTILER_DARK_MAP_ID }}
|
|
ELEMENT_ANDROID_SENTRY_DSN: ${{ secrets.ELEMENT_ANDROID_SENTRY_DSN }}
|
|
ELEMENT_SDK_SENTRY_DSN: ${{ secrets.ELEMENT_SDK_SENTRY_DSN }}
|
|
ELEMENT_CALL_SENTRY_DSN: ${{ secrets.ELEMENT_CALL_SENTRY_DSN }}
|
|
ELEMENT_CALL_POSTHOG_API_HOST: ${{ secrets.ELEMENT_CALL_POSTHOG_API_HOST }}
|
|
ELEMENT_CALL_POSTHOG_API_KEY: ${{ secrets.ELEMENT_CALL_POSTHOG_API_KEY }}
|
|
ELEMENT_CALL_RAGESHAKE_URL: ${{ secrets.ELEMENT_CALL_RAGESHAKE_URL }}
|
|
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 }}
|
|
- name: Additionally upload Nightly APK to browserstack for testing
|
|
continue-on-error: true # don't block anything by this upload failing (for now)
|
|
run: |
|
|
curl -u "$BROWSERSTACK_USERNAME:$BROWSERSTACK_PASSWORD" -X POST "https://api-cloud.browserstack.com/app-automate/upload" -F "file=@app/build/outputs/apk/gplay/nightly/app-gplay-universal-nightly.apk" -F "custom_id=element-x-android-nightly"
|
|
env:
|
|
BROWSERSTACK_USERNAME: ${{ secrets.ELEMENT_ANDROID_BROWSERSTACK_USERNAME }}
|
|
BROWSERSTACK_PASSWORD: ${{ secrets.ELEMENT_ANDROID_BROWSERSTACK_ACCESS_KEY }}
|