Skip to content

Commit 8575c53

Browse files
committed
Fix PyPI publishing with trusted publishing
- Add id-token: write permission for OIDC authentication - Remove API token authentication in favor of trusted publishing - This should resolve the PyPI publishing failure
1 parent 12fd6a2 commit 8575c53

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/ci-cd.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ jobs:
5151
needs: test
5252
runs-on: ubuntu-latest
5353
if: github.event_name == 'release' && github.event.action == 'published'
54+
permissions:
55+
id-token: write # Required for trusted publishing to PyPI
5456

5557
steps:
5658
- uses: actions/checkout@v4
@@ -72,6 +74,3 @@ jobs:
7274

7375
- name: Publish to PyPI
7476
uses: pypa/gh-action-pypi-publish@release/v1
75-
with:
76-
user: __token__
77-
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)