Skip to content

Commit 1a38b7c

Browse files
authored
Switch to trusted publishing for PyPI publish in CI (#110)
1 parent 87bfce1 commit 1a38b7c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,12 @@ jobs:
199199
runs-on: ubuntu-latest
200200
needs: [tests, release]
201201
if: success() && startsWith(github.ref, 'refs/tags/v')
202+
environment:
203+
name: pypi
204+
url: https://pypi.org/p/rendercanvas
205+
permissions:
206+
contents: write
207+
id-token: write
202208
steps:
203209
- uses: actions/checkout@v4
204210
- name: Set up Python
@@ -222,5 +228,4 @@ jobs:
222228
- name: Publish to PyPI
223229
uses: pypa/gh-action-pypi-publish@release/v1
224230
with:
225-
user: __token__
226-
password: ${{ secrets.PYPI_PASSWORD }}
231+
print-hash: true

0 commit comments

Comments
 (0)