Skip to content

Commit

Permalink
Merge pull request #150 from iterative/pypi-trusted-publishers
Browse files Browse the repository at this point in the history
Migrate from PyPI tokens to Trusted Publishers
  • Loading branch information
casperdcl authored Sep 11, 2023
2 parents 4196b56 + a96a571 commit 3b7d8c6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
deploy:
needs: test
name: PyPI Deploy
environment: pypi
permissions:
contents: write
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -39,8 +43,9 @@ jobs:
uses: casperdcl/deploy-pypi@v2
with:
build: true
password: ${{ secrets.PYPI_TOKEN }}
upload: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
upload: false
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
name: Release
run: |
Expand Down

0 comments on commit 3b7d8c6

Please sign in to comment.