From b4e59b453d895d423bb0fb4adeaa122fa4836330 Mon Sep 17 00:00:00 2001 From: Jatin K Malik Date: Mon, 16 Feb 2026 20:52:09 -0800 Subject: [PATCH] fix(ci): delete local tags before creating nightly release (#218) The nightly workflow fails when re-running on the same day because after deleting the remote tag, the local tag still exists in the runner's checkout. GitHub CLI sees this local tag and expects it to be pushed to remote. This fix adds 'git tag -d' to delete local tags in both the cleanup and create release steps, ensuring clean state before creating new releases. --- .github/workflows/nightly.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 8ea34ef..5e0f51b 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -100,6 +100,7 @@ jobs: echo "Deleting old nightly release: $tag (created: $(date -d @$RELEASE_DATE -u +"%Y-%m-%d %H:%M:%S UTC"))" gh release delete "$tag" --yes --repo ${{ github.repository }} 2>/dev/null || true git push origin :refs/tags/"$tag" 2>/dev/null || true + git tag -d "$tag" 2>/dev/null || true else echo "Keeping nightly release: $tag (created: $(date -d @$RELEASE_DATE -u +"%Y-%m-%d %H:%M:%S UTC"))" fi @@ -210,6 +211,7 @@ jobs: # If a release for today already exists, delete it first gh release delete "$RELEASE_TAG" --yes --repo ${{ github.repository }} 2>/dev/null || true git push origin :refs/tags/"$RELEASE_TAG" 2>/dev/null || true + git tag -d "$RELEASE_TAG" 2>/dev/null || true gh release create "$RELEASE_TAG" \ --title "Nightly Build - ${{ steps.version.outputs.version }}" \