Skip to content

Commit 1b0ff8f

Browse files
authored
Update deploy-pypi.yml
Fix workflow to publish on PyPI using a Trusted Publisher (see https://docs.pypi.org/trusted-publishers/using-a-publisher/)
1 parent 02ffc6e commit 1b0ff8f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/deploy-pypi.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
jobs:
99
deploy-pypi:
1010
runs-on: ubuntu-latest
11+
# Specifying a GitHub environment is optional, but strongly encouraged
12+
environment: pypi
13+
permissions:
14+
# IMPORTANT: this permission is mandatory for Trusted Publishing
15+
id-token: write
1116
steps:
1217
- uses: actions/checkout@v4
1318

@@ -27,6 +32,3 @@ jobs:
2732
2833
- name: Publish package
2934
uses: pypa/gh-action-pypi-publish@release/v1
30-
with:
31-
user: __token__
32-
password: ${{ secrets.pypi_password }}

0 commit comments

Comments
 (0)