From b4aadbfedaa0af5bb4255a6446df840a888b8d01 Mon Sep 17 00:00:00 2001 From: Jay Date: Wed, 11 Nov 2026 15:37:37 -0500 Subject: [PATCH] ci: replace go-based release-action with scripted gitea release API call (no go on host runner) --- .gitea/workflows/release.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 8d5ea565c..5ff4329da 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -30,8 +30,17 @@ jobs: run: cp app/build/outputs/apk/release/app-release.apk "auxio-${GITHUB_REF_NAME}.apk" - name: Create release - uses: https://gitea.com/actions/release-action@main - with: - files: auxio-${{ github.ref_name }}.apk - api_key: "${{ secrets.RELEASE_TOKEN }}" - title: "Auxio fork ${{ github.ref_name }}" + env: + TOKEN: ${{ secrets.RELEASE_TOKEN }} + run: | + API=https://git.wisehodl.dev/api/v1/repos/jay/auxio-fork + AUTH="Authorization: token $TOKEN" + TAG="${GITHUB_REF_NAME}" + REL=$(curl -sf "$API/releases/tags/$TAG" -H "$AUTH") || \ + REL=$(curl -sf -X POST "$API/releases" -H "$AUTH" -H "Content-Type: application/json" \ + -d "{\"tag_name\":\"$TAG\",\"name\":\"Auxio fork $TAG\",\"target_commitish\":\"$TAG\"}") + RID=$(echo "$REL" | jq -r .id) + AID=$(echo "$REL" | jq -r '.assets[]? | select(.name=="auxio-'"$TAG"'.apk") | .id') + [ -n "$AID" ] && [ "$AID" != "null" ] && curl -sf -X DELETE "$API/releases/$RID/assets/$AID" -H "$AUTH" + curl -sf -X POST "$API/releases/$RID/assets?name=auxio-$TAG.apk" -H "$AUTH" \ + -F "attachment=@auxio-$TAG.apk" >/dev/null