Skip to content

Commit 0ffb4ee

Browse files
Update publish workflow to use OIDC for PyPI publishing (#241)
1 parent 15413fd commit 0ffb4ee

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ jobs:
99
deploy:
1010
runs-on: ubuntu-latest
1111
timeout-minutes: 20
12+
# IMPORTANT: This permission is mandatory for trusted publishing
13+
permissions:
14+
id-token: write
1215
steps:
1316
- uses: actions/checkout@v6
1417

@@ -21,6 +24,4 @@ jobs:
2124
- name: Publish distribution 📦 to PyPI
2225
if: startsWith(github.ref, 'refs/tags')
2326
uses: pypa/gh-action-pypi-publish@release/v1
24-
with:
25-
user: __token__
26-
password: ${{ secrets.PYPI_API_TOKEN }}
27+
# Omit 'user' and 'password' inputs; OIDC is used automatically

0 commit comments

Comments
 (0)