From 1e103d82951f4bed8343f82e944e149cf542dc3e Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 30 Jul 2026 23:12:14 +0000 Subject: [PATCH] Create GitHub Release on PyPI publish and fail loudly on duplicate versions Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Ssy8nmvQp1U5d73pCMFNXi --- .github/workflows/build-and-publish-to-pypi.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish-to-pypi.yml b/.github/workflows/build-and-publish-to-pypi.yml index 2280541..5771c86 100644 --- a/.github/workflows/build-and-publish-to-pypi.yml +++ b/.github/workflows/build-and-publish-to-pypi.yml @@ -6,6 +6,8 @@ on: jobs: build-and-publish: runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout code uses: actions/checkout@v3 @@ -25,4 +27,8 @@ jobs: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_ACCESS_TOKEN }} run: | - python -m twine upload dist/* --skip-existing + python -m twine upload dist/* + - name: Create GitHub Release + env: + GH_TOKEN: ${{ github.token }} + run: gh release create "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --title "$GITHUB_REF_NAME" --generate-notes