Skip to content

Commit

Permalink
Use PyPI trusted publishing to push release to PyPI (#651)
Browse files Browse the repository at this point in the history
* Use PyPI trusted publishing to push release to PyPI

* Add id-token:write permissions
  • Loading branch information
jni committed Jun 5, 2024
1 parent df083f1 commit cec8109
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ jobs:
needs: test
runs-on: ubuntu-latest
if: ${{ github.repository == 'pyapp-kit/magicgui' && contains(github.ref, 'tags') }}
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -155,8 +157,5 @@ jobs:
with:
files: dist/*
body_path: ${{ github.workspace }}/CHANGELOG.md
- name: Publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
run: twine upload dist/*
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit cec8109

Please sign in to comment.