From a44827c2a62438ff445fb75cea3230112e6d3529 Mon Sep 17 00:00:00 2001 From: alexcrea <42614139+alexcrea@users.noreply.github.com> Date: Sat, 14 Jun 2025 12:06:23 +0200 Subject: [PATCH] should upload the jars individually now --- .github/workflows/gradle.yml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 10e258a..8d532e9 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -47,12 +47,31 @@ jobs: - name: Build with Gradle Wrapper run: ./gradlew build --parallel - - name: Upload build artifacts + # Get the names of the online and offline jars + - name: Get file name for online JAR of CustomAnvil # grep -v "offline" to exclude offline jar + run: | + ONLINE_JAR_NAME=$(ls build/libs/CustomAnvil-*.jar | grep -v "offline") + echo "online_jar_name=${ONLINE_JAR_NAME}" >> $GITHUB_ENV + + - name: Get file name for offline JAR of CustomAnvil + run: | + OFFLINE_JAR_NAME=$(ls build/libs/CustomAnvil-*-offline.jar) + echo "offline_jar_name=${OFFLINE_JAR_NAME}" >> $GITHUB_ENV + + # upload the named jars + - name: Upload online JAR artifact uses: actions/upload-artifact@v4 with: - name: Package - path: build/libs/* + name: ${{ env.online_jar_name }} + path: build/libs/${{ env.online_jar_name }} + - name: Upload offline JAR file + uses: actions/upload-artifact@v4 + with: + name: ${{ env.online_jar_name }} + path: build/libs/${{ env.online_jar_name }} + + # Finally, upload test result - name: Summarize tests results uses: jeantessier/test-summary-action@v1 if: ${{ always() }}