assembleFlavors.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
  2. # SPDX-License-Identifier: MIT
  3. name: "Assemble"
  4. on:
  5. pull_request:
  6. branches: [ master, stable-* ]
  7. # Declare default permissions as read only.
  8. permissions: read-all
  9. concurrency:
  10. group: assemble-flavors-${{ github.head_ref || github.run_id }}
  11. cancel-in-progress: true
  12. jobs:
  13. flavor:
  14. runs-on: ubuntu-latest
  15. strategy:
  16. fail-fast: false
  17. matrix:
  18. flavor: [ Generic, Gplay ]
  19. steps:
  20. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  21. - name: set up JDK 17
  22. uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
  23. with:
  24. distribution: "temurin"
  25. java-version: 17
  26. - name: Build ${{ matrix.flavor }}
  27. run: |
  28. echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" >> gradle.properties
  29. ./gradlew assemble${{ matrix.flavor }}
  30. - name: Archive apk
  31. uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
  32. if: ${{ always() }}
  33. with:
  34. name: Nextcloud-${{ matrix.flavor }}-APK
  35. path: app/build/outputs/apk/**/**/*.apk
  36. retention-days: 5