Skip to content

Commit d83f5d8

Browse files
committed
Update python-publish.yml
Switch to PyPI Trusted Publisher package distribution
1 parent 6afa93f commit d83f5d8

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/python-publish.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ permissions:
88
contents: read
99

1010
jobs:
11-
publish:
11+
pypi-publish:
12+
name: upload release to PyPI
1213
runs-on: ubuntu-latest
14+
environment: release
15+
permissions:
16+
id-token: write
1317
steps:
1418
- uses: actions/checkout@v4
1519
- name: Set up Python
@@ -22,8 +26,5 @@ jobs:
2226
python -m pip install build
2327
- name: Build package
2428
run: python -m build
25-
- name: Publish package
26-
uses: pypa/gh-action-pypi-publish@release/v1
27-
with:
28-
user: __token__
29-
password: ${{ secrets.PYPI_API_TOKEN }}
29+
- name: Publish package distributions to PyPI
30+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)