From 982eeecabcf2911b0ca5666500fe4d5c524cac44 Mon Sep 17 00:00:00 2001 From: "s0wlz (Matthias Puchstein)" Date: Wed, 18 Mar 2026 02:58:34 +0100 Subject: [PATCH] ci: replace action-gh-release with direct Gitea API calls --- .gitea/workflows/release.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index e82461d..f4edd1c 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -27,8 +27,22 @@ jobs: server.ts - name: Publish release - uses: softprops/action-gh-release@v2 - with: - files: elden-counter.exe env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITEA_URL: ${{ github.server_url }} + REPO: ${{ github.repository }} + TAG: ${{ github.ref_name }} + run: | + # Create the release + RELEASE=$(curl -s -X POST "$GITEA_URL/api/v1/repos/$REPO/releases" \ + -H "Authorization: token $GITEA_TOKEN" \ + -H "Content-Type: application/json" \ + -d "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\",\"draft\":false,\"prerelease\":false}") + RELEASE_ID=$(echo "$RELEASE" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2) + + # Upload the exe as a release asset + curl -s -X POST "$GITEA_URL/api/v1/repos/$REPO/releases/$RELEASE_ID/assets" \ + -H "Authorization: token $GITEA_TOKEN" \ + -H "Content-Type: application/octet-stream" \ + --data-binary @elden-counter.exe \ + -G --data-urlencode "name=elden-counter.exe"