From bee4b48790a009a457cb467a6b63aee160eaab90 Mon Sep 17 00:00:00 2001 From: Jayaram Kancherla Date: Sat, 22 Mar 2025 21:56:56 -0700 Subject: [PATCH] Use the trusted publisher workflow --- .github/workflows/publish-pypi.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 29657bb..1760f1d 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -10,6 +10,11 @@ on: jobs: build: runs-on: ubuntu-latest + permissions: + id-token: write + repository-projects: write + contents: write + pages: write steps: - uses: actions/checkout@v4 @@ -45,8 +50,6 @@ jobs: run: | python -m tox -e clean,build - - name: Publish package - uses: pypa/gh-action-pypi-publish@v1.12.2 - with: - user: __token__ - password: ${{ secrets.PYPI_PASSWORD }} + # This uses the trusted publisher workflow so no token is required. + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1