From 70282dfb651a33d82a27d4ffc39d533c64f88788 Mon Sep 17 00:00:00 2001 From: ARIA Date: Sun, 23 Aug 2026 19:53:17 +0200 Subject: [PATCH] fix(release): use Forgejo-style /assets and /tags API routes The server (gitea.zephyre.one) exposes a Forgejo-compatible API: - release attachments live at POST /releases/{id}/assets, not /attachments - tag deletion is DELETE /tags/{tag}, not DELETE /git/refs/tags/{tag} (verified against the live API: /attachments 404s, /assets and /tags exist) --- .gitea/workflows/release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index b1842eb..ff5893b 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -206,7 +206,7 @@ jobs: if [ -n "$OLD_ID" ]; then api -X DELETE -H "$AUTH" "$API/releases/$OLD_ID" > /dev/null fi - api -X DELETE -H "$AUTH" "$API/git/refs/tags/$TAG" > /dev/null || true + api -X DELETE -H "$AUTH" "$API/tags/$TAG" > /dev/null || true # Gitea creates the tag at the default branch HEAD automatically. RELEASE_ID=$(api -X POST -H "$AUTH" -H "Content-Type: application/json" \ @@ -219,7 +219,8 @@ jobs: for f in "$GITHUB_WORKSPACE"/iris-android-v* "$GITHUB_WORKSPACE"/iris-desktop-*; do [ -f "$f" ] || continue echo "Uploading $(basename "$f")" + # Forgejo-style API: release assets live under /assets, not /attachments. api -X POST -H "$AUTH" -F "attachment=@$f" \ - "$API/releases/$RELEASE_ID/attachments" > /dev/null + "$API/releases/$RELEASE_ID/assets" > /dev/null done echo "Done: $SERVER/$REPO/releases/tag/$TAG"