From a8e7dfca6de8d74b882b571b6937198e1bac7442 Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Mon, 9 Feb 2026 11:15:02 -0500 Subject: [PATCH] fix: push tag to GitHub before creating release Ensures the tag exists on the correct GitHub repo before attempting to create a release. This prevents the release from being created on the wrong repo when the tag doesn't exist yet. The fix adds a git push of the tag to the target GitHub repo (determined by ${GITHUB_REPO}) before calling the GitHub API to create the release. --- .gitea/workflows/release.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 870b120..55e03ef 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -122,6 +122,9 @@ jobs: continue-on-error: true run: | [ "$SKIP_BUILD" = "true" ] && exit 0 + # Push tag to GitHub first so it exists before creating the release + git remote add github-release https://x-access-token:${{ secrets.GH_PAT }}@github.com/${GITHUB_REPO}.git 2>/dev/null || true + git push -f github-release ${GITHUB_REF_NAME} 2>/dev/null || true GH_API="https://api.github.com/repos/${GITHUB_REPO}" # Create release or fetch existing one BODY=$(curl -s -X POST \