diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8c8fef9d..16f6c291 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -40,3 +40,20 @@ jobs: uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 with: attestations: true + + github-release: + needs: [deploy] + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && github.repository == 'pytest-dev/pluggy' + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Publish GitHub release + env: + GH_TOKEN: ${{ github.token }} + run: | + if gh release view "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then + echo "GitHub release $GITHUB_REF_NAME already exists" + else + gh release create "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --verify-tag --title "$GITHUB_REF_NAME" --notes "" + fi diff --git a/changelog/437.feature.rst b/changelog/437.feature.rst new file mode 100644 index 00000000..51fd3550 --- /dev/null +++ b/changelog/437.feature.rst @@ -0,0 +1 @@ +Published pluggy versions now receive a GitHub Release after successful PyPI deployment, allowing GitHub Release subscribers to receive notifications about new versions.