11# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
2+ # SPDX-FileCopyrightText: 2026 Alper Ozturk <alper.ozturk@nextcloud.com>
23# SPDX-FileCopyrightText: 2023 Andy Scherzinger <info@andy-scherzinger.de>
34# SPDX-License-Identifier: MIT
45name : " QA"
@@ -17,7 +18,7 @@ concurrency:
1718
1819jobs :
1920 qa :
20- runs-on : ubuntu-latest
21+ runs-on : ubuntu-latest-max
2122 steps :
2223 - name : Check if secrets are available
2324 run : echo "ok=${{ secrets.KS_PASS != '' }}" >> "$GITHUB_OUTPUT"
3738 java-version : 25
3839
3940 - name : Build QA
41+ id : build-qa
4042 if : ${{ steps.check-secrets.outputs.ok == 'true' }}
4143 env :
4244 KS_PASS : ${{ secrets.KS_PASS }}
@@ -46,14 +48,24 @@ jobs:
4648 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4749 run : |
4850 mkdir -p "$HOME/.gradle"
49- echo "org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" > "$HOME/.gradle/gradle.properties"
50- echo "org.gradle.caching=true; org.gradle.parallel=true; org.gradle.configureondemand=true" >> "$HOME/.gradle/gradle.properties"
51+ {
52+ echo "org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g"
53+ echo "org.gradle.caching=true"
54+ echo "org.gradle.parallel=true"
55+ echo "org.gradle.configureondemand=true"
56+ } > "$HOME/.gradle/gradle.properties"
5157 [ -e app/build.gradle ] && sed -i "/qa/,/\}/ s/versionCode .*/versionCode ${{github.event.number}} /" "app/build.gradle"
5258 [ -e app/build.gradle ] && sed -i "/qa/,/\}/ s/versionName .*/versionName \"${{github.event.number}}\"/" "app/build.gradle"
5359 [ -e app/build.gradle.kts ] && sed -i "/qa/,/\}/ s/versionCode .*/versionCode = ${{github.event.number}} /" "app/build.gradle.kts"
5460 [ -e app/build.gradle.kts ] && sed -i "/qa/,/\}/ s/versionName .*/versionName = \"${{github.event.number}}\"/" "app/build.gradle.kts"
5561 ./gradlew assembleQaDebug
5662 $(find /usr/local/lib/android/sdk/build-tools/*/apksigner | sort | tail -n1) sign --ks-pass pass:"$KS_PASS" --key-pass pass:"$KEY_PASS" --ks-key-alias key0 --ks ".github/workflows/QA_keystore.jks" app/build/outputs/apk/qa/debug/*qa-debug*.apk
63+ apk=$(find app/build/outputs/apk/qa/debug -name '*qa-debug*.apk' | head -n1)
64+ {
65+ echo "apk-path=$apk"
66+ echo "apk-name=$(basename "$apk")"
67+ echo "apk-size=$(du -h "$apk" | cut -f1)"
68+ } >> "$GITHUB_OUTPUT"
5769
5870 - name : Upload APK
5971 id : upload-apk
@@ -64,22 +76,41 @@ jobs:
6476 archive : false
6577
6678 - name : Create QR Code
79+ if : ${{ steps.check-secrets.outputs.ok == 'true' }}
80+ env :
81+ ARTIFACT_URL : ${{ steps.upload-apk.outputs.artifact-url }}
6782 run : |
6883 sudo apt-get -y install qrencode
69- qrencode -o qr.png "${{ steps.upload-apk.outputs.artifact-url }} "
84+ qrencode -s 8 - o qr.png "$ARTIFACT_URL "
7085
7186 - name : Upload QR
7287 id : upload-qr
7388 uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
7489 with :
7590 path : qr.png
91+ if-no-files-found : error
7692 retention-days : 7
7793 archive : false
7894
7995 - name : Comment PR
96+ if : ${{ steps.check-secrets.outputs.ok == 'true' }}
8097 uses : thollander/actions-comment-pull-request@e4a76dd2b0a3c2027c3fd84147a67c22ee4c90fa
8198 with :
99+ comment-tag : qa-apk
100+ mode : upsert
82101 message : |
83- APK file: ${{ steps.upload-apk.outputs.artifact-url }}
84- To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
85-  (please click on link to get QR code displayed)
102+ ### :iphone: QA build
103+
104+ | | |
105+ |---|---|
106+ | **Download** | [${{ steps.build-qa.outputs.apk-name }}](${{ steps.upload-apk.outputs.artifact-url }}) |
107+ | **QR code** | [Open the QR code for this download](${{ steps.upload-qr.outputs.artifact-url }}) |
108+ | **Commit** | ${{ github.event.pull_request.head.sha }} |
109+ | **Version** | `${{ github.event.number }}` |
110+ | **Available until** | 7 days after this build |
111+
112+ The QA build installs alongside a released Nextcloud app, so you can keep
113+ using your existing install while testing.
114+
115+ Downloading the file requires a GitHub account, so open this link on the
116+ device you want to test on, or transfer the APK to it.
0 commit comments