Skip to content

Commit 01595b5

Browse files
use Trusted Publishing
1 parent 7955807 commit 01595b5

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

.github/workflows/python-publish.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# This workflow will upload a Python Package using Twine when a release is created
2-
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3-
4-
# This workflow uses actions that are not certified by GitHub.
5-
# They are provided by a third-party and are governed by
6-
# separate terms of service, privacy policy, and support
7-
# documentation.
8-
91
name: Upload Python Package
102
permissions: {}
113

@@ -21,6 +13,9 @@ jobs:
2113
contents: read
2214
environment:
2315
name: pypi-publish
16+
permissions:
17+
# IMPORTANT: this permission is mandatory for Trusted Publishing
18+
id-token: write
2419

2520
steps:
2621
- uses: actions/checkout@v6
@@ -38,6 +33,3 @@ jobs:
3833
run: python -m build
3934
- name: Publish package
4035
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e
41-
with:
42-
user: __token__
43-
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)