Skip to content

Commit 21d4fdd

Browse files
authored
publish to pypi as a trusted publisher
1 parent ba49719 commit 21d4fdd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/release.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
jobs:
1212
deploy:
1313
runs-on: ubuntu-latest
14+
environment: release
15+
permissions:
16+
id-token: write
1417
steps:
1518
- uses: actions/checkout@v3
1619
- name: Set up Python
@@ -30,14 +33,11 @@ jobs:
3033
- name: Publish to PyPI
3134
uses: pypa/gh-action-pypi-publish@release/v1
3235
if: ${{ github.event_name == 'release' }}
33-
with:
34-
password: ${{ secrets.PYPI_API_TOKEN }}
3536

3637
- name: Publish to Test PyPI
3738
uses: pypa/gh-action-pypi-publish@release/v1
3839
if: ${{ github.event_name != 'release' }}
3940
with:
40-
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
4141
repository_url: https://test.pypi.org/legacy/
4242
# Since we run this often, it's OK if that version already exists
4343
skip_existing: true

0 commit comments

Comments
 (0)