Skip to content

Commit

Permalink
Create GitHub release when pushing tag.
Browse files Browse the repository at this point in the history
Fix #1347.
  • Loading branch information
aaugustin committed May 7, 2023
1 parent bf51a57 commit 9c578a1
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,25 @@ jobs:
with:
path: wheelhouse/*.whl

upload_pypi:
name: Upload to PyPI
release:
name: Release
needs:
- sdist
- wheels
runs-on: ubuntu-latest
# Don't release when running the workflow manually from GitHub's UI.
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Create GitHub release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create ${{ github.ref_name }} --notes "See https://websockets.readthedocs.io/en/stable/project/changelog.html for details."

0 comments on commit 9c578a1

Please sign in to comment.