2 Commits

Author SHA1 Message Date
4bc0779967 Update .gitea/workflows/build.yml
All checks were successful
Build Minecraft Mod / build (push) Successful in 3m57s
Build Minecraft Mod / release (push) Successful in 18s
2026-03-31 16:28:12 +00:00
ab32bc230e fahhh
Some checks failed
Build Minecraft Mod / build (push) Successful in 4m26s
Build Minecraft Mod / release (push) Failing after 17s
2026-03-31 17:11:41 +02:00

View File

@@ -87,7 +87,7 @@ jobs:
echo "Failed to read mod info" echo "Failed to read mod info"
exit 1 exit 1
fi fi
JAR="build/libs/${NAME}-${VERSION}.jar" JAR="${NAME}-${VERSION}.jar"
echo "NAME=$NAME" >> $GITEA_ENV echo "NAME=$NAME" >> $GITEA_ENV
echo "VERSION=$VERSION" >> $GITEA_ENV echo "VERSION=$VERSION" >> $GITEA_ENV
echo "JAR=$JAR" >> $GITEA_ENV echo "JAR=$JAR" >> $GITEA_ENV
@@ -131,13 +131,16 @@ jobs:
- name: Upload the mod JAR - name: Upload the mod JAR
run: | run: |
if [ ! -f "$JAR" ]; then # Use the artifact downloaded in the previous step
echo "Error: JAR not found: $JAR" JAR_FILE=$(ls ./release-artifacts/*.jar | head -n 1)
if [ ! -f "$JAR_FILE" ]; then
echo "Error: JAR not found in ./release-artifacts/"
exit 1 exit 1
fi fi
curl -X POST \ curl -X POST \
-H "Authorization: token ${{ secrets.GITEATOKEN }}" \ -H "Authorization: token ${{ secrets.GITEATOKEN }}" \
-H "Content-Type: application/java-archive" \ -H "Content-Type: application/java-archive" \
--data-binary @"$JAR" \ --data-binary @"$JAR_FILE" \
"${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/${RELEASE_ID}/assets?name=$(basename $JAR)" "${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/${RELEASE_ID}/assets?name=$(basename $JAR_FILE)"