5
5
branches :
6
6
- master
7
7
pull_request :
8
+ types : [opened, synchronize, reopened]
8
9
9
10
jobs :
10
11
build :
11
12
runs-on : ubuntu-latest
12
13
strategy :
13
14
matrix :
14
- java :
15
- - 17
15
+ java : [17]
16
16
fail-fast : false
17
+
17
18
steps :
19
+ - name : Find existing comment
20
+ uses : peter-evans/find-comment@v3
21
+ if : github.event_name == 'pull_request'
22
+ id : find-comment
23
+ with :
24
+ issue-number : ${{ github.event.pull_request.number }}
25
+ comment-author : ' github-actions[bot]'
26
+
27
+ - name : Set progress comment
28
+ uses : peter-evans/create-or-update-comment@v4
29
+ if : github.event_name == 'pull_request'
30
+ id : update-progress
31
+ with :
32
+ comment-id : ${{ steps.find-comment.outputs.comment-id }}
33
+ issue-number : ${{ github.event.pull_request.number }}
34
+ body : |
35
+ ### 🚧 Build in progress...
36
+
37
+ > [!NOTE]
38
+ > A new commit has been pushed. A development build of **EternalCore** will be available here once the workflow completes.
39
+ edit-mode : replace
40
+
18
41
- name : Checkout
19
42
20
- - name : ' Set up JDK ${{ matrix.java }}'
43
+
44
+ - name : Set up JDK ${{ matrix.java }}
21
45
22
46
with :
23
47
distribution : adopt
24
- java-version : ' ${{ matrix.java }}'
48
+ java-version : ${{ matrix.java }}
49
+
25
50
- name : Cache Gradle
26
51
27
52
with :
28
53
path : ~/.gradle/caches
29
54
key : >-
30
- ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*',
31
- '**/gradle-wrapper.properties') }}
55
+ ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
32
56
restore-keys : ' ${{ runner.os }}-gradle-'
33
- - name : Grant execute permission for gradlew
57
+
58
+ - name : Make gradlew executable
34
59
run : chmod +x gradlew
35
- - name : Build the Jar
36
- run : ' ./gradlew clean eternalcore-plugin:shadowJar'
37
- - name : Upload a Build Artifact
60
+
61
+ - name : Build the plugin
62
+ run : ./gradlew clean eternalcore-plugin:shadowJar
63
+
64
+ - name : Upload built JAR
38
65
66
+ id : upload-artifact
39
67
with :
40
- name : ' EternalCore'
41
- path : eternalcore-plugin/build/libs/EternalCore*.jar
68
+ name : EternalCore Dev Build
69
+ path : eternalcore-plugin/build/libs/EternalCore*.jar
70
+ retention-days : 14
71
+ overwrite : true
72
+
73
+ - name : Update comment with download link
74
+ uses : peter-evans/create-or-update-comment@v4
75
+ if : github.event_name == 'pull_request'
76
+ with :
77
+ comment-id : ${{ steps.find-comment.outputs.comment-id }}
78
+ body : |
79
+ ### 📦 Development Build Ready
80
+
81
+ > [!WARNING]
82
+ > **Do not use this build in production.** It is for testing purposes only and may be unstable.
83
+
84
+ 👉 [**Click here to download the JAR**](${{ steps.upload-artifact.outputs.artifact-url }})
85
+
86
+ edit-mode : replace
87
+ reactions : rocket
0 commit comments