From 9ad98d971bc90aff7eae662543ec635ffc35732b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Jul 2026 23:43:18 +0000 Subject: [PATCH] Fix Nightly tag handling in release workflow --- .github/workflows/nightly.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index d4b444f3df..e0facf9fa7 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -824,19 +824,23 @@ jobs: run: ls -R tmp - name: Delete existing Nightly release and tag - continue-on-error: true env: GH_TOKEN: ${{ github.token }} run: | - # Delete the release first (this also deletes assets) - gh release delete Nightly --yes || echo "No release to delete" - # Delete the tag explicitly - git push origin :refs/tags/Nightly || echo "No tag to delete" + if gh release view Nightly > /dev/null 2>&1; then + # Delete the release and associated tag if it exists. + gh release delete Nightly --yes --cleanup-tag + else + echo "No release to delete" + fi - name: Create Nightly release env: GH_TOKEN: ${{ github.token }} run: | + git tag -f Nightly "${{ github.sha }}" + git push --force origin refs/tags/Nightly + ls find tmp -type f \( -name "*.zip" -o -name "*.whl" -o -name "*.tar.gz" -o -name "*.nupkg" -o -name "*.snupkg" \) -print0 > release_files.txt @@ -862,7 +866,7 @@ jobs: --title "Nightly" \ --notes "Automated nightly build from commit ${{ github.sha }}" \ --prerelease \ - --target ${{ github.sha }} \ + --verify-tag \ "${unique_files[@]}" else echo "No files to release after deduplication"