From 03668320920c723103102421975e6bd1e4baa81a Mon Sep 17 00:00:00 2001 From: Seva D Date: Fri, 30 Oct 2026 17:16:34 +0400 Subject: [PATCH] ci(release): publish to PyPI via trusted publishing (OIDC) Drop the long-lived PYPI_TOKEN secret from the publish step and request an id-token instead, so PyPI authenticates the GitHub Actions run itself. Requires the matching trusted publisher on PyPI (owner vsdudakov, this repo, workflow release.yml) before the next tag. --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index de92805..b42cf70 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,6 +14,9 @@ permissions: jobs: publish: + permissions: + id-token: write # PyPI trusted publishing (OIDC), no stored token + contents: read name: Build and publish to PyPI runs-on: ubuntu-latest steps: @@ -27,6 +30,5 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: packages-dir: dist - password: ${{ secrets.PYPI_TOKEN }} # Don't fail a re-run/re-tag when a version is already on PyPI. skip-existing: true