ci(publish): drop the TestPyPI target - #25
Merged
Conversation
The TestPyPI rehearsal failed on the first real attempt:
invalid-publisher: valid token, but no corresponding publisher
sub: repo:OpenRouterTeam/python-agent:environment:testpypi
environment: testpypi
The OIDC claims were exactly right. TestPyPI is a separate site with its own
account and its own trusted-publisher config, so it needed a second registration
that pypi.org's does not cover. That makes the rehearsal fail for a reason the real
publish would not — worse than having no rehearsal, because it reports a problem
that does not exist on the path that matters.
Every other gate in that run passed, which is the useful part: verify, the
ahead-of-release guard, build, twine check --strict, isolated wheel import, and the
already-published check. Those all run under dry-run, so the dry run already covers
what the rehearsal was for — everything except the upload itself.
Removed: the `target` input, the TestPyPI publish step, the dual-index branch in
the already-published guard, and `${{ inputs.target }}` from the environment,
concurrency group, artifact name, and messages. The job now pins `environment:
pypi` directly, so the trusted-publisher identity is unambiguous.
The `testpypi` repo environment is left in place but unused; harmless, and
removing it is a separate decision.
Verification: publish.yaml parses, single `dry-run` input, one publish step gated
on `dry-run == false`, environment pinned to pypi · verify.sh PASS (0 failures).
Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The TestPyPI rehearsal failed on its first real attempt:
The OIDC claims were exactly right. TestPyPI is a separate site with its own account and its own trusted-publisher config, so it needs a second registration that the pypi.org one doesn't cover.
That makes the rehearsal fail for a reason the real publish would not — which is worse than having no rehearsal, because it reports a problem that doesn't exist on the path that matters.
What the failed run did prove
Every other step passed, and those are the ones worth having:
All of those run under
dry-runtoo — so the dry run already covers what the rehearsal was for: everything except the upload itself.Changes
targetinput, so the only input isdry-runPublish to TestPyPIstep${{ inputs.target }}in the environment, concurrency group, artifact name, and messagesenvironment: pypiis now pinned directly, so the trusted-publisher identity is unambiguousThe
testpypirepo environment is left in place but unused — harmless, and removing it is a separate decision.Verification
publish.yamlparses · singledry-runinput · one publish step gated ondry-run == false·environment: pypi·verify.shPASS (0 failures).Note
0.8.0is honest to publish once this lands — the ported commit680bcebis upstream's@openrouter/agent@0.8.0tag commit, which the ahead-of-release guard confirmed in the failed run (Ported tree is level with ... 0.8.0 is honest to publish).Worth double-checking the pypi.org pending publisher uses environment
pypibefore the real run, since the TestPyPI failure showed how easy that field is to get wrong.🤖 Generated with Claude Code