@@ -24,10 +24,23 @@ jobs:
24
24
issue-number : ${{ github.event.pull_request.number }}
25
25
comment-author : ' github-actions[bot]'
26
26
27
- - name : Set progress comment
27
+ - name : Create progress comment if not exists
28
28
uses : peter-evans/create-or-update-comment@v4
29
- if : github.event_name == 'pull_request'
30
- id : update-progress
29
+ if : github.event_name == 'pull_request' && steps.find-comment.outputs.comment-id == ''
30
+ id : create-comment
31
+ with :
32
+ issue-number : ${{ github.event.pull_request.number }}
33
+ body : |
34
+ ### 🚧 Build in progress...
35
+
36
+ > [!NOTE]
37
+ > A new commit has been pushed. A development build of **EternalCore** will be available here once the workflow completes.
38
+ edit-mode : replace
39
+
40
+ - name : Update progress comment if exists
41
+ uses : peter-evans/create-or-update-comment@v4
42
+ if : github.event_name == 'pull_request' && steps.find-comment.outputs.comment-id != ''
43
+ id : update-comment
31
44
with :
32
45
comment-id : ${{ steps.find-comment.outputs.comment-id }}
33
46
issue-number : ${{ github.event.pull_request.number }}
38
51
> A new commit has been pushed. A development build of **EternalCore** will be available here once the workflow completes.
39
52
edit-mode : replace
40
53
54
+ - name : Set comment-id output
55
+ id : comment
56
+ run : |
57
+ echo "comment-id=${{ steps.find-comment.outputs.comment-id != '' && steps.find-comment.outputs.comment-id || steps.create-comment.outputs.comment-id }}" >> $GITHUB_OUTPUT
58
+
41
59
- name : Checkout
42
60
43
61
@@ -74,14 +92,14 @@ jobs:
74
92
uses : peter-evans/create-or-update-comment@v4
75
93
if : github.event_name == 'pull_request'
76
94
with :
77
- comment-id : ${{ steps.find- comment.outputs.comment-id }}
95
+ comment-id : ${{ steps.comment.outputs.comment-id }}
78
96
body : |
79
97
### 📦 Development Build Ready
80
98
81
99
> [!WARNING]
82
100
> **Do not use this build in production.** It is for testing purposes only and may be unstable.
83
101
84
102
👉 [**Click here to download the JAR**](${{ steps.upload-artifact.outputs.artifact-url }})
85
-
103
+
86
104
edit-mode : replace
87
105
reactions : rocket
0 commit comments