3737 java-version : 21
3838
3939 - name : Build QA
40- id : build-qa
4140 if : ${{ steps.check-secrets.outputs.ok == 'true' }}
4241 env :
4342 KS_PASS : ${{ secrets.KS_PASS }}
@@ -47,70 +46,40 @@ jobs:
4746 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4847 run : |
4948 mkdir -p "$HOME/.gradle"
50- {
51- echo "org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g"
52- echo "org.gradle.caching=true"
53- echo "org.gradle.parallel=true"
54- echo "org.gradle.configureondemand=true"
55- } > "$HOME/.gradle/gradle.properties"
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"
5651 [ -e app/build.gradle ] && sed -i "/qa/,/\}/ s/versionCode .*/versionCode ${{github.event.number}} /" "app/build.gradle"
5752 [ -e app/build.gradle ] && sed -i "/qa/,/\}/ s/versionName .*/versionName \"${{github.event.number}}\"/" "app/build.gradle"
5853 [ -e app/build.gradle.kts ] && sed -i "/qa/,/\}/ s/versionCode .*/versionCode = ${{github.event.number}} /" "app/build.gradle.kts"
5954 [ -e app/build.gradle.kts ] && sed -i "/qa/,/\}/ s/versionName .*/versionName = \"${{github.event.number}}\"/" "app/build.gradle.kts"
6055 ./gradlew assembleQaDebug
6156 $(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
62- apk=$(find app/build/outputs/apk/qa/debug -name '*qa-debug*.apk' | head -n1)
63- echo "apk-path=$apk" >> "$GITHUB_OUTPUT"
64- echo "apk-name=$(basename "$apk")" >> "$GITHUB_OUTPUT"
65- echo "apk-size=$(du -h "$apk" | cut -f1)" >> "$GITHUB_OUTPUT"
6657
6758 - name : Upload APK
6859 id : upload-apk
69- if : ${{ steps.check-secrets.outputs.ok == 'true' }}
7060 uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
7161 with :
72- path : ${{ steps.build-qa.outputs.apk-path }}
73- if-no-files-found : error
62+ path : app/build/outputs/apk/qa/debug/*qa-debug*.apk
7463 retention-days : 7
7564 archive : false
7665
77- - name : Create QR code
78- if : ${{ steps.check-secrets.outputs.ok == 'true' }}
79- env :
80- ARTIFACT_URL : ${{ steps.upload-apk.outputs.artifact-url }}
66+ - name : Create QR Code
8167 run : |
8268 sudo apt-get -y install qrencode
83- qrencode -s 8 - o qr.png "$ARTIFACT_URL "
69+ qrencode -o qr.png "${{ steps.upload-apk.outputs.artifact-url }} "
8470
85- - name : Upload QR code
71+ - name : Upload QR
8672 id : upload-qr
87- if : ${{ steps.check-secrets.outputs.ok == 'true' }}
8873 uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
8974 with :
9075 path : qr.png
91- if-no-files-found : error
9276 retention-days : 7
9377 archive : false
9478
9579 - name : Comment PR
96- if : ${{ steps.check-secrets.outputs.ok == 'true' }}
9780 uses : thollander/actions-comment-pull-request@e4a76dd2b0a3c2027c3fd84147a67c22ee4c90fa
9881 with :
99- comment-tag : qa-apk
100- mode : upsert
10182 message : |
102- ### :iphone: QA build
103-
104- | | |
105- |---|---|
106- | **Download** | [${{ steps.build-qa.outputs.apk-name }}](${{ steps.upload-apk.outputs.artifact-url }}) (${{ steps.build-qa.outputs.apk-size }}) |
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.
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)
0 commit comments