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

This commit is contained in:
2026-03-31 16:28:12 +00:00
parent ab32bc230e
commit 4bc0779967

View File

@@ -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)"
--data-binary @"$JAR_FILE" \
"${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/${RELEASE_ID}/assets?name=$(basename $JAR_FILE)"