ci: replace go-based release-action with scripted gitea release API call (no go on host runner)
Build / build (push) Successful in 5m2s
Release / release (push) Successful in 8m33s

This commit is contained in:
jay
2026-11-11 15:37:37 -05:00
parent 15fa13002e
commit b4aadbfeda
+14 -5
View File
@@ -30,8 +30,17 @@ jobs:
run: cp app/build/outputs/apk/release/app-release.apk "auxio-${GITHUB_REF_NAME}.apk" run: cp app/build/outputs/apk/release/app-release.apk "auxio-${GITHUB_REF_NAME}.apk"
- name: Create release - name: Create release
uses: https://gitea.com/actions/release-action@main env:
with: TOKEN: ${{ secrets.RELEASE_TOKEN }}
files: auxio-${{ github.ref_name }}.apk run: |
api_key: "${{ secrets.RELEASE_TOKEN }}" API=https://git.wisehodl.dev/api/v1/repos/jay/auxio-fork
title: "Auxio fork ${{ github.ref_name }}" 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