Skip to content

Commit bb2c238

Browse files
authored
switch from API tokens to OIDC for PyPI uploads (#235)
1 parent d2d8852 commit bb2c238

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/tests+pypi.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ jobs:
125125
dist_check:
126126
runs-on: ubuntu-latest
127127
needs: [build]
128+
permissions:
129+
id-token: write
128130
steps:
129131
- uses: actions/setup-python@v2
130132
- run: pip install twine auditwheel
@@ -146,9 +148,6 @@ jobs:
146148
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
147149
uses: pypa/gh-action-pypi-publish@master
148150
with:
149-
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
150151
repository_url: https://test.pypi.org/legacy/
151152
- if: startsWith(github.ref, 'refs/tags')
152153
uses: pypa/gh-action-pypi-publish@master
153-
with:
154-
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)