From 48b31d7d44860abee24a9e44cf02ffd97c2a5add Mon Sep 17 00:00:00 2001 From: MiTHRAL Date: Wed, 19 Aug 2026 15:33:43 -0400 Subject: [PATCH] Replace softprops release action with native Gitea API release softprops/action-gh-release@v1 is not mirrored on the Forgejo action mirror, which fatally aborted the job at action-download. Create the release via the Gitea REST API using the built-in GITHUB_TOKEN and upload both pack artifacts directly. --- .gitea/workflows/build-pack.yaml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/build-pack.yaml b/.gitea/workflows/build-pack.yaml index 12fcb9f..43297df 100644 --- a/.gitea/workflows/build-pack.yaml +++ b/.gitea/workflows/build-pack.yaml @@ -137,10 +137,19 @@ jobs: - name: Release if: startsWith(github.ref, 'refs/tags/v') - uses: softprops/action-gh-release@v1 - with: - files: | - SciCraft-Modrinth.mrpack - SciCraft-CurseForge.zip - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + run: | + set -e + TAG="${GITHUB_REF_NAME}" + API="https://git.mithraic.cloud/api/v1/repos/ad3laid3/SciCraft/releases" + AUTH="Authorization: token ${{ secrets.GITHUB_TOKEN }}" + RELEASE_JSON=$(curl -sS -X POST "$API" \ + -H "$AUTH" \ + -H "Content-Type: application/json" \ + -d "{\"tag_name\":\"$TAG\",\"name\":\"SCICRAFT $TAG\",\"body\":\"Automated release built from Gitea Actions.\"}") + RELEASE_ID=$(printf '%s' "$RELEASE_JSON" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])") + for f in SciCraft-Modrinth.mrpack SciCraft-CurseForge.zip; do + curl -sS -X POST "$API/$RELEASE_ID/assets?name=$(basename "$f")" \ + -H "$AUTH" \ + -F "attachment=@$f" + echo "Uploaded $f" + done \ No newline at end of file