From 25d46109033a2609fae8d9486375714705cf1436 Mon Sep 17 00:00:00 2001 From: Andriy Oblivantsev Date: Thu, 19 Feb 2026 20:02:43 +0000 Subject: [PATCH] Fix release: use Gitea API directly instead of gitea-release-action The action requires Node 18+ (Headers API) but runner uses Node 16. Use curl against Gitea API for release creation and asset upload. Co-authored-by: Cursor --- .github/workflows/release.yaml | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 298458d..5d69915 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -124,14 +124,26 @@ jobs: git push https://${{ gitea.actor }}:${{ gitea.token }}@git.produktor.io/${{ gitea.repository }}.git "${{ steps.version.outputs.new_tag }}" - name: Create Gitea Release - uses: https://gitea.com/actions/gitea-release-action@v1 - with: - server_url: ${{ gitea.server_url }} - token: ${{ gitea.token }} - tag_name: ${{ steps.version.outputs.new_tag }} - name: FleetDM Stack ${{ steps.version.outputs.new_tag }} - body: | - **${{ steps.version.outputs.bump_type }}** release — `${{ steps.version.outputs.new_tag }}` + run: | + TAG="${{ steps.version.outputs.new_tag }}" + BUMP="${{ steps.version.outputs.bump_type }}" + API="https://git.produktor.io/api/v1/repos/${{ gitea.repository }}/releases" + TOKEN="${{ gitea.token }}" - Helm chart for FleetDM Server with MySQL and Redis. - files: .tmp/*.tgz + # Create release + RELEASE=$(curl -sf -X POST "$API" \ + -H "Authorization: token $TOKEN" \ + -H "Content-Type: application/json" \ + -d "{\"tag_name\":\"$TAG\",\"name\":\"FleetDM Stack $TAG\",\"body\":\"**${BUMP}** release — \`${TAG}\`\n\nHelm chart for FleetDM Server with MySQL and Redis.\"}") + RELEASE_ID=$(echo "$RELEASE" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2) + echo "Created release ID: $RELEASE_ID" + + # Upload chart package + for f in .tmp/*.tgz; do + FNAME=$(basename "$f") + curl -sf -X POST "$API/$RELEASE_ID/assets?name=$FNAME" \ + -H "Authorization: token $TOKEN" \ + -H "Content-Type: application/octet-stream" \ + --data-binary "@$f" + echo "Uploaded: $FNAME" + done