Skip to content
This repository was archived by the owner on Apr 9, 2026. It is now read-only.

Commit b21fa6a

Browse files
committed
Update build.yml
1 parent 5e8bf70 commit b21fa6a

1 file changed

Lines changed: 12 additions & 16 deletions

File tree

.github/workflows/build.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,20 @@ jobs:
3030

3131
- name: Build with Maven
3232
run: mvn -B package --file pom.xml
33-
34-
- name: List target directory
35-
run: ls -la target/
3633

37-
- name: Direct Upload JAR
34+
- name: Prepare Artifact
35+
run: |
36+
mkdir -p artifacts
37+
find target -name '*.jar' ! -name 'original-*.jar' -exec cp {} artifacts/plugin.jar \;
38+
echo "JAR_PATH=$(find artifacts -name 'plugin.jar')" >> $GITHUB_ENV
39+
40+
- name: Upload Artifact
3841
uses: actions/upload-artifact@v4
3942
with:
40-
if-no-files-found: error
41-
path: |
42-
target/*.jar
43-
!target/original-*.jar
44-
name: Plugin.jar
43+
name: plugin.jar
44+
path: ${{ env.JAR_PATH }}
4545
retention-days: 5
46-
compression: raw
46+
compression: none
4747

4848
- name: Send Discord Notification
4949
if: success()
@@ -67,16 +67,12 @@ jobs:
6767
- name: Download JAR
6868
uses: actions/download-artifact@v4
6969
with:
70-
name: Plugin.jar
71-
path: ./
72-
73-
- name: List files
74-
run: ls -la
70+
name: plugin.jar
7571

7672
- name: Upload Release
7773
uses: softprops/action-gh-release@v2
7874
with:
79-
files: "*.jar"
75+
files: plugin.jar
8076
fail_on_unmatched_files: true
8177

8278
- name: Send Release Discord Notification

0 commit comments

Comments
 (0)