Skip to content

Commit d124abb

Browse files
JusterZhuclaude
andcommitted
fix: delete existing release before recreate
gh release edit does not support --generate-notes, so delete and recreate the release when it already exists for the same tag. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 0b450cc commit d124abb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/publish-nuget.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ jobs:
6767
GH_TOKEN: ${{ github.token }}
6868
run: |
6969
TAG="v${{ inputs.version }}"
70+
if gh release view "$TAG" --json tagName &>/dev/null; then
71+
gh release delete "$TAG" --yes
72+
fi
7073
gh release create "$TAG" \
7174
artifacts/*.nupkg \
7275
--title "$TAG" \
7376
--generate-notes \
74-
--verify-tag || \
75-
gh release edit "$TAG" \
76-
--title "$TAG" \
77-
--generate-notes
77+
--verify-tag
7878
7979
- name: Push NuGet package to NuGet.org (Trusted Publishing via OIDC)
8080
run: |

0 commit comments

Comments
 (0)