Skip to content

Commit 90b5fc8

Browse files
QA APK on GitHub
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
1 parent a8fb526 commit 90b5fc8

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

.github/workflows/qa.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,21 @@ jobs:
5656
$(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
5757
5858
- name: Upload APK
59+
id: upload-apk
5960
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
6061
with:
61-
name: ${{github.event.number}}.zip
6262
path: app/build/outputs/apk/qa/debug/*qa-debug*.apk
6363
retention-days: 7
6464
archive: false
65+
66+
- name: Create QR Code
67+
uses: kentaro-m/qr-code-commenter-action@c9a7e8ef9d092e19d0ddfe7447acae32b6084eb4
68+
with:
69+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
70+
content: "${{ steps.upload-apk.outputs.artifact-url }}"
71+
comment: |
72+
APK file: ${{ steps.upload-apk.outputs.artifact-url }}
73+
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
74+
{qrcode}
75+
76+

.github/workflows/uploadArtifact.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ PASS=$2
1818
BUILD=$3
1919
PR=$4
2020
GITHUB_TOKEN=$5
21+
URL=$6
2122
DAV_URL=https://nextcloud.kaminsky.me/remote.php/dav/files/$USER/android-artifacts/
2223

2324
source .github/workflows/lib.sh
@@ -26,7 +27,7 @@ REPO=$(cat scripts/repo)
2627
if ! test -e app/build/outputs/apk/qa/debug/*qa-debug*.apk ; then
2728
exit 1
2829
fi
29-
echo "Uploaded artifact to $DAV_URL/$BUILD.apk"
30+
echo "Uploaded artifact to $URL"
3031

3132
# delete all old comments, starting with "APK file:"
3233
oldComments=$(curl_gh -X GET https://api.github.com/repos/nextcloud/$REPO/issues/$PR/comments | jq '.[] | (.id |tostring) + "|" + (.user.login | test("github-actions") | tostring) + "|" + (.body | test("APK file:.*") | tostring)' | grep "true|true" | tr -d "\"" | cut -f1 -d"|")
@@ -37,8 +38,7 @@ done
3738

3839
sudo apt-get -y install qrencode
3940

40-
qrencode -o $PR.png "$PUBLIC_URL/$BUILD.apk"
41+
qrencode -o $PR.png "$URL"
4142

42-
curl -u $USER:$PASS -X PUT $DAV_URL/$BUILD.apk --upload-file app/build/outputs/apk/qa/debug/*qa-debug*.apk
4343
curl -u $USER:$PASS -X PUT $DAV_URL/$BUILD.png --upload-file $PR.png
4444
curl_gh -X POST https://api.github.com/repos/nextcloud/$REPO/issues/$PR/comments -d "{ \"body\" : \"APK file: $PUBLIC_URL/$BUILD.apk <br/><br/> ![qrcode]($PUBLIC_URL/$BUILD.png) <br/><br/>To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app. \" }"

0 commit comments

Comments
 (0)