From db52f00b37f58262391b776cc08a571903d5d778 Mon Sep 17 00:00:00 2001 From: Greg Nazario Date: Wed, 8 Apr 2026 17:16:58 -0400 Subject: [PATCH] ci: create GitHub Release after publishing and tagging Run gh release create with generated notes after the version tag is pushed. Tag pushes from GITHUB_TOKEN do not trigger other workflows, so the release step must live in this job. Checkout uses fetch-depth 0 so release notes can compare history. Made-with: Cursor --- .github/workflows/pypi_publish.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/pypi_publish.yml b/.github/workflows/pypi_publish.yml index 505209a..16876f3 100644 --- a/.github/workflows/pypi_publish.yml +++ b/.github/workflows/pypi_publish.yml @@ -14,6 +14,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 + with: + fetch-depth: 0 # better gh release --generate-notes - name: Install uv uses: astral-sh/setup-uv@v8.0.0 @@ -69,3 +71,14 @@ jobs: run: | git tag "v${{ steps.version.outputs.version }}" git push origin "v${{ steps.version.outputs.version }}" + + - name: Create GitHub Release + if: steps.version.outputs.publish == 'true' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + VERSION="${{ steps.version.outputs.version }}" + gh release create "v${VERSION}" \ + --title "v${VERSION}" \ + --generate-notes \ + --verify-tag