From c5e143b77668dbf989c9abf0b9a596727fa02b4a Mon Sep 17 00:00:00 2001 From: UlisseWolf <88635118+UlisseWolf@users.noreply.github.com> Date: Mon, 31 Aug 2026 22:06:44 +0200 Subject: [PATCH] fix release push --- .github/workflows/release.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 470c623..d2acd21 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -156,11 +156,17 @@ jobs: ``` EOF - - name: Replace rolling release - if: needs.prepare.outputs.release_tag == 'latest' + - name: Remove any pre-existing release for this tag + # Not just "latest": if a release for this tag already exists - e.g. because it was + # created through the GitHub web UI (the "Draft a new release" flow creates the tag and + # the release together) rather than by pushing a tag via git - "gh release create" + # below would fail with "already exists". Deleting it first (a no-op if it doesn't + # exist) means the workflow always ends up with a single, correctly-versioned release + # regardless of how the tag was created. --cleanup-tag also removes the tag itself, but + # "gh release create ... --target " below recreates it at the right commit anyway. env: GH_TOKEN: ${{ github.token }} - run: gh release delete latest --repo "${{ github.repository }}" --yes --cleanup-tag || true + run: gh release delete "${{ needs.prepare.outputs.release_tag }}" --repo "${{ github.repository }}" --yes --cleanup-tag || true - name: Create release env: