Skip to content

Commit 8829036

Browse files
authored
Merge pull request #4241 from TeamAmaze/ondemand-comment-artifact
update ondemand workflow & fix CI
2 parents 4af78df + c83a700 commit 8829036

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

.github/workflows/android-debug-artifact-ondemand.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,33 @@ jobs:
5252
arguments: assembleDebug --stacktrace
5353
- name: Upload fdroid artifact
5454
uses: actions/upload-artifact@v4
55+
id: artifact-upload-fdroid
5556
with:
5657
name: Amaze-Fdroid-debug
5758
path: app/build/outputs/apk/fdroid/debug/app-fdroid-debug.apk
59+
if-no-files-found: error
5860
- name: Upload play artifact
5961
uses: actions/upload-artifact@v4
62+
id: artifact-upload-play
6063
with:
6164
name: Amaze-Play-debug
6265
path: app/build/outputs/apk/play/debug/app-play-debug.apk
63-
- name: Notify the user with a comment once the APK is uploaded # TODO: update this with the link to the artifacts
66+
if-no-files-found: error
67+
- name: Get the PR number
68+
id: find-pr-id
69+
run: |
70+
PR_NUMBER=$(jq --raw-output .issue.number "$GITHUB_EVENT_PATH")
71+
72+
echo "PR_Number: $PR_NUMBER"
73+
echo "PR_NUMBER=$PR_NUMBER" >> "$GITHUB_OUTPUT"
74+
- name: Notify the user with a comment once the APK is uploaded
6475
uses: peter-evans/create-or-update-comment@v2
6576
with:
66-
issue-number: ${{ github.event.issue.number }}
77+
issue-number: ${{ steps.find-pr-id.outputs.PR_NUMBER }}
6778
body: |
68-
The requested APKs has been built. Please find them from the artifacts section of this PR.
79+
Requested APKs have been built. Please find them from the links below.
80+
81+
FDroid Flavour: ${{ steps.artifact-upload-fdroid.outputs.artifact-url }}
82+
Play Flavour: ${{ steps.artifact-upload-play.outputs.artifact-url }}
83+
84+
PS: you should be logged in to access the artifacts.

0 commit comments

Comments
 (0)