Skip to content

Commit 3b7d8c6

Browse files
authored
Merge pull request #150 from iterative/pypi-trusted-publishers
Migrate from PyPI tokens to Trusted Publishers
2 parents 4196b56 + a96a571 commit 3b7d8c6

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/test.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ jobs:
2626
deploy:
2727
needs: test
2828
name: PyPI Deploy
29+
environment: pypi
30+
permissions:
31+
contents: write
32+
id-token: write
2933
runs-on: ubuntu-latest
3034
steps:
3135
- uses: actions/checkout@v3
@@ -39,8 +43,9 @@ jobs:
3943
uses: casperdcl/deploy-pypi@v2
4044
with:
4145
build: true
42-
password: ${{ secrets.PYPI_TOKEN }}
43-
upload: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
46+
upload: false
47+
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
48+
uses: pypa/gh-action-pypi-publish@release/v1
4449
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
4550
name: Release
4651
run: |

0 commit comments

Comments
 (0)