From b21fa6a78fa1d6d717b9507263b1b3e5b83a014b Mon Sep 17 00:00:00 2001 From: Koopa <115321970+KoopaCode@users.noreply.github.com> Date: Fri, 31 Jan 2025 20:55:04 -0500 Subject: [PATCH] Update build.yml --- .github/workflows/build.yml | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a7ac3bd..d805c3f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,20 +30,20 @@ jobs: - name: Build with Maven run: mvn -B package --file pom.xml - - - name: List target directory - run: ls -la target/ - - name: Direct Upload JAR + - name: Prepare Artifact + run: | + mkdir -p artifacts + find target -name '*.jar' ! -name 'original-*.jar' -exec cp {} artifacts/plugin.jar \; + echo "JAR_PATH=$(find artifacts -name 'plugin.jar')" >> $GITHUB_ENV + + - name: Upload Artifact uses: actions/upload-artifact@v4 with: - if-no-files-found: error - path: | - target/*.jar - !target/original-*.jar - name: Plugin.jar + name: plugin.jar + path: ${{ env.JAR_PATH }} retention-days: 5 - compression: raw + compression: none - name: Send Discord Notification if: success() @@ -67,16 +67,12 @@ jobs: - name: Download JAR uses: actions/download-artifact@v4 with: - name: Plugin.jar - path: ./ - - - name: List files - run: ls -la + name: plugin.jar - name: Upload Release uses: softprops/action-gh-release@v2 with: - files: "*.jar" + files: plugin.jar fail_on_unmatched_files: true - name: Send Release Discord Notification