From 67b42dcc81cec312bc628af56326e7bac84a7519 Mon Sep 17 00:00:00 2001 From: Spencer Churchill <25377399+splch@users.noreply.github.com> Date: Fri, 1 May 2026 13:09:47 -0700 Subject: [PATCH] Make Release workflow idempotent via softprops/action-gh-release The github-release step previously called `gh release create` directly, which fails with HTTP 422 when a release already exists for the tag - the case when a maintainer creates the release through the GitHub UI (which also creates the tag and triggers this workflow). Both v0.1.0 and v0.1.1 hit this and reported red even though PyPI publish succeeded. softprops/action-gh-release updates the existing release instead of failing, so both flows (push-tag-only and create-release-in-UI) now end green. The action talks to the API directly, so the checkout step is no longer needed in this job. --- .github/workflows/release.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 68a6a60..5a116df 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,10 +73,6 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0 with: - persist-credentials: false - - name: Create GitHub Release - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: gh release create "$GITHUB_REF_NAME" --generate-notes + generate_release_notes: true