Skip to content

Commit f2c0b8f

Browse files
committed
ci: wire deploy to PyPI trusted publishing via pypi environment
The deploy job was trying to publish with password=${{ secrets.PYPI_API_TOKEN }}, but the repo has no API token secret — only the pypi GitHub environment, which is the convention for OIDC trusted publishing. The job lacked environment: pypi and id-token: write, so OIDC token retrieval failed. Removed the password input so the action uses trusted publishing.
1 parent d267980 commit f2c0b8f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ jobs:
124124
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
125125
runs-on: ubuntu-latest
126126
needs: [test, security, integration]
127+
environment: pypi
128+
permissions:
129+
contents: write
130+
id-token: write
127131
steps:
128132
- uses: actions/checkout@v4
129133

@@ -143,8 +147,6 @@ jobs:
143147
144148
- name: Publish to PyPI
145149
uses: pypa/gh-action-pypi-publish@release/v1
146-
with:
147-
password: ${{ secrets.PYPI_API_TOKEN }}
148150

149151
- name: Create GitHub Release
150152
uses: softprops/action-gh-release@v2

0 commit comments

Comments
 (0)