2024-03-21 19:49:34 +03:00
|
|
|
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2021-04-22 19:17:02 +03:00
|
|
|
name: "Assemble"
|
|
|
|
|
|
|
|
on:
|
2022-12-16 17:13:55 +03:00
|
|
|
pull_request:
|
|
|
|
branches: [ master, stable-* ]
|
2022-12-16 14:24:03 +03:00
|
|
|
|
|
|
|
# Declare default permissions as read only.
|
|
|
|
permissions: read-all
|
2021-04-22 19:17:02 +03:00
|
|
|
|
2023-06-08 14:58:40 +03:00
|
|
|
concurrency:
|
|
|
|
group: assemble-flavors-${{ github.head_ref || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-04-22 19:17:02 +03:00
|
|
|
jobs:
|
2022-12-16 17:13:55 +03:00
|
|
|
flavor:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
flavor: [ Generic, Gplay ]
|
|
|
|
steps:
|
2024-06-17 18:54:12 +03:00
|
|
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
2023-04-25 22:11:24 +03:00
|
|
|
- name: set up JDK 17
|
2024-03-14 20:33:40 +03:00
|
|
|
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
|
2022-12-16 17:13:55 +03:00
|
|
|
with:
|
|
|
|
distribution: "temurin"
|
2023-04-14 20:20:30 +03:00
|
|
|
java-version: 17
|
2022-12-16 17:13:55 +03:00
|
|
|
- name: Build ${{ matrix.flavor }}
|
|
|
|
run: |
|
|
|
|
echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" >> gradle.properties
|
|
|
|
./gradlew assemble${{ matrix.flavor }}
|
|
|
|
- name: Archive apk
|
2024-07-08 10:28:03 +03:00
|
|
|
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
|
2022-12-16 17:13:55 +03:00
|
|
|
if: ${{ always() }}
|
|
|
|
with:
|
2023-12-20 13:20:55 +03:00
|
|
|
name: Nextcloud-${{ matrix.flavor }}-APK
|
2022-12-16 17:13:55 +03:00
|
|
|
path: app/build/outputs/apk/**/**/*.apk
|
|
|
|
retention-days: 5
|