From 4bc07799677eef25d73cb0f1c97c463d8f36b0ab Mon Sep 17 00:00:00 2001 From: miloszekxxd Date: Tue, 31 Mar 2026 16:28:12 +0000 Subject: [PATCH] Update .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 767849b..fe4f075 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -131,13 +131,16 @@ jobs: - name: Upload the mod JAR run: | - if [ ! -f "$JAR" ]; then - echo "Error: JAR not found: $JAR" + # Use the artifact downloaded in the previous step + JAR_FILE=$(ls ./release-artifacts/*.jar | head -n 1) + + if [ ! -f "$JAR_FILE" ]; then + echo "Error: JAR not found in ./release-artifacts/" exit 1 fi curl -X POST \ -H "Authorization: token ${{ secrets.GITEATOKEN }}" \ -H "Content-Type: application/java-archive" \ - --data-binary @"$JAR" \ - "${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/${RELEASE_ID}/assets?name=$(basename $JAR)" \ No newline at end of file + --data-binary @"$JAR_FILE" \ + "${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/${RELEASE_ID}/assets?name=$(basename $JAR_FILE)" \ No newline at end of file