Merge branch 'release/0.5.3' into main #38
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: Create release App Bundle and APKs | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
# Enrich gradle.properties for CI/CD | |
env: | |
GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx9g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -XX:+UseG1GC -Dkotlin.daemon.jvm.options=-Xmx4g -Dkotlin.incremental=false | |
CI_GRADLE_ARG_PROPERTIES: --stacktrace --no-daemon -Dsonar.gradle.skipCompile=true | |
jobs: | |
gplay: | |
name: Create App Bundle (Gplay) | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ format('build-release-main-gplay-{0}', github.sha) }} | |
cancel-in-progress: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' # See 'Supported distributions' for available options | |
java-version: '17' | |
- name: Configure gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Create app bundle | |
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 }} | |
run: ./gradlew bundleGplayRelease $CI_GRADLE_ARG_PROPERTIES | |
- name: Upload bundle as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: elementx-app-gplay-bundle-unsigned | |
path: | | |
app/build/outputs/bundle/gplayRelease/app-gplay-release.aab | |
enterprise: | |
name: Create App Bundle Enterprise | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'element-hq/element-x-android' }} | |
concurrency: | |
group: ${{ format('build-release-main-enterprise-{0}', github.sha) }} | |
cancel-in-progress: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Add SSH private keys for submodule repositories | |
uses: webfactory/[email protected] | |
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'element-hq/element-x-android' }} | |
with: | |
ssh-private-key: ${{ secrets.ELEMENT_ENTERPRISE_DEPLOY_KEY }} | |
- name: Clone submodules | |
run: git submodule update --init --recursive | |
- name: Use JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' # See 'Supported distributions' for available options | |
java-version: '17' | |
- name: Configure gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Create Enterprise app bundle | |
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 }} | |
run: ./gradlew bundleGplayRelease $CI_GRADLE_ARG_PROPERTIES | |
- name: Upload bundle as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: elementx-enterprise-app-gplay-bundle-unsigned | |
path: | | |
app/build/outputs/bundle/gplayRelease/app-gplay-release.aab | |
fdroid: | |
name: Create APKs (FDroid) | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ format('build-release-main-fdroid-{0}', github.sha) }} | |
cancel-in-progress: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' # See 'Supported distributions' for available options | |
java-version: '17' | |
- name: Configure gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Create APKs | |
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 }} | |
run: ./gradlew assembleFdroidRelease $CI_GRADLE_ARG_PROPERTIES | |
- name: Upload apks as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: elementx-app-fdroid-apks-unsigned | |
path: | | |
app/build/outputs/apk/fdroid/release/*.apk |