From 62ad19516b74cb71f2188f9f83147263b4238bce Mon Sep 17 00:00:00 2001 From: miloszekxxd Date: Tue, 31 Mar 2026 16:41:54 +0000 Subject: [PATCH] Trying to fix the issue where it gives a lot of files instead of one. #2 --- .gitea/workflows/build.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 41adf07..720e452 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -131,16 +131,15 @@ jobs: - name: Upload the mod JAR run: | - # Find the main jar (usually does NOT contain -sources or -dev in the name) - JAR_FILE=$(ls ./release-artifacts/*.jar | grep -vE "sources|dev|api|all" | head -n 1) + # Find the largest JAR file (the main mod file is 120 MiB, others are KiB) + JAR_FILE=$(ls -S ./release-artifacts/*.jar | head -n 1) if [ ! -f "$JAR_FILE" ]; then echo "Error: Main JAR not found in ./release-artifacts/" - ls ./release-artifacts/ exit 1 fi - echo "Uploading: $(basename $JAR_FILE)" + echo "Uploading largest file: $(basename $JAR_FILE)" curl -X POST \ -H "Authorization: token ${{ secrets.GITEATOKEN }}" \