Skip to content

Commit 437fdf2

Browse files
vladiimclaude
andcommitted
ci(publish): ship with a token, since the publisher claim never matched
Trusted publishing was refused with `invalid-publisher` on every attempt -- PyPI had no publisher matching the claims GitHub presents. Nothing uploads on that failure, so 0.10.0 stayed tagged and unpublished while the release commit said otherwise, and no Python customer had the page-cache fix. OIDC is still the better design and the header says how to get back to it. Shipping beats elegance while three other SDKs are already live. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013eVY2CMkT9qYuanxCCfBAQ
1 parent f0d3042 commit 437fdf2

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

.github/workflows/publish.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
# Publishes to PyPI via Trusted Publishing (OIDC).
1+
# Publishes to PyPI with an API token held in the PYPI_API_TOKEN secret.
22
#
3-
# No token is stored anywhere: GitHub proves this workflow's identity to PyPI
4-
# directly, so there is nothing to expire, mis-scope or lose. Configure the
5-
# trusted publisher once at pypi.org → the project → Settings → Publishing,
6-
# naming this repository and this workflow file (publish.yml).
3+
# Trusted Publishing (OIDC) is the better design — no credential to expire,
4+
# mis-scope or lose — and this workflow used it first. It was refused with
5+
# `invalid-publisher` on every attempt: PyPI had no publisher matching the
6+
# claims GitHub presents (repo mbuzzco/mbuzz-python, workflow publish.yml,
7+
# environment pypi). Nothing uploads on that failure, so 0.10.0 sat tagged and
8+
# unpublished for a day while the release commit said otherwise.
9+
#
10+
# The token is the way back to shipping, not the destination. Once the trusted
11+
# publisher is configured on PyPI, restore the OIDC form: drop `password:`
12+
# below, restore `permissions: id-token: write`, and delete the secret.
713
#
814
# Release by pushing a tag that matches the version in pyproject.toml:
915
#
@@ -26,10 +32,6 @@ jobs:
2632
runs-on: ubuntu-latest
2733
environment: pypi
2834

29-
# Required for Trusted Publishing — without it PyPI has no identity to verify.
30-
permissions:
31-
id-token: write
32-
3335
steps:
3436
- uses: actions/checkout@v4
3537

@@ -60,3 +62,5 @@ jobs:
6062

6163
- name: Publish
6264
uses: pypa/gh-action-pypi-publish@release/v1
65+
with:
66+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)