Skip to content

Commit

Permalink
Use pypa/gh-actions-pypi-publish for releasing
Browse files Browse the repository at this point in the history
In order to support trusted publishing.

I believe twine doesn't support it yet, see:

pypa/twine#999
  • Loading branch information
coldfix committed Nov 23, 2023
1 parent 3a4a807 commit 9029ab9
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,14 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v') && success()
environment:
name: pypi
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: pip install twine

- name: Publish PyPI package
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: twine upload dist/*.whl dist/*.tar.gz
- uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 9029ab9

Please sign in to comment.