From 9adc81705fe804a353593f942bf5fe5823b0bf54 Mon Sep 17 00:00:00 2001 From: Bill Date: Sun, 26 Oct 2025 13:32:52 -0400 Subject: [PATCH] fix: use Gitea API directly instead of action reference Replace the gitea-release-action with direct API calls using curl. This approach works on both GitHub (which runs this step conditionally) and Gitea servers, using their compatible REST APIs. --- .github/workflows/release.yml | 51 ++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5a0300d..b3905c1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -110,25 +110,40 @@ jobs: - name: Create draft release (Gitea) if: github.server_url != 'https://github.com' - uses: https://gitea.com/actions/gitea-release-action@main - with: - files: | - main.js - manifest.json - styles.css - draft: true - title: ${{ github.ref_name }} - body: | - Release ${{ github.ref_name }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + TAG_VERSION="${GITHUB_REF#refs/tags/}" - ## Changes + # Create release via API + RELEASE_ID=$(curl -X POST \ + -H "Accept: application/json" \ + -H "Authorization: token $GITHUB_TOKEN" \ + -H "Content-Type: application/json" \ + "${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases" \ + -d "$(cat <