Skip to content

Commit c8cae77

Browse files
committed
fix(ci): drop Test PyPI entirely rather than fix its trusted publisher
PyPI accepts a pre-release version identifier (0.3.0rc1) on the real index directly, and pip ignores it without --pre -- there was never a need to route a release candidate to a separate staging index to hold it safely. Test PyPI existed here only as that safety net. publish-to-pypi now runs unconditionally instead of skipping for a release candidate, which also makes this consistent with what npm and Maven Central already do. publish-dev-to-testpypi.yml is deleted -- it's been failing on every push to main since the 2026-08-16 migration anyway (see reqstool/.github#92), and there's nowhere left for it to publish to. Needs reqstool/.github#92 merged first. Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
1 parent c52e3fd commit c8cae77

2 files changed

Lines changed: 10 additions & 62 deletions

File tree

.github/workflows/publish-dev-to-testpypi.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -95,26 +95,13 @@ jobs:
9595
version: ${{ needs.prepare.outputs.version }}
9696
artifact: dist-tagged
9797

98-
publish-to-testpypi:
99-
needs: [prepare, assets]
100-
runs-on: ubuntu-latest
101-
environment:
102-
name: test
103-
url: https://test.pypi.org
104-
permissions:
105-
id-token: write
106-
steps:
107-
- uses: reqstool/.github/.github/actions/publish-to-pypi@main
108-
with:
109-
target: testpypi
110-
artifact: dist-tagged
111-
11298
# PyPI is the only step here that cannot be undone: a version can be yanked but
113-
# never replaced. A release candidate stops at Test PyPI -- pip needs --pre to
114-
# see a prerelease anyway.
99+
# never replaced. Publishes release candidates too, with their pre-release
100+
# identifier -- pip ignores them without --pre, so there is nothing unsafe
101+
# about it landing on the real index; there is no separate staging index to
102+
# route them to instead. Matches npm and Maven Central's existing behavior.
115103
publish-to-pypi:
116-
needs: [prepare, publish-to-testpypi]
117-
if: ${{ needs.prepare.outputs.prerelease != 'true' }}
104+
needs: [prepare, assets]
118105
runs-on: ubuntu-latest
119106
environment:
120107
name: stable
@@ -124,24 +111,19 @@ jobs:
124111
steps:
125112
- uses: reqstool/.github/.github/actions/publish-to-pypi@main
126113
with:
127-
target: pypi
128114
artifact: dist-tagged
129115

130116
# Last, deliberately. Everything above can fail, and until this runs nothing
131117
# resolving "the latest release" can see what was built -- the release is still
132118
# a prerelease. Promotion itself is one API call against a release that already
133119
# has its artifacts.
134120
#
135-
# The guard is `no job failed`, not the default `every job succeeded`: a release
136-
# candidate deliberately skips the publish jobs that a real release runs, and a
137-
# skipped dependency would otherwise cascade and skip this too -- leaving the
138-
# candidate unpromoted, which is right, and every *real* release unpromoted the
139-
# moment any optional job is skipped, which is not.
140-
#
141-
# `!inputs.dry-run` has to be spelled out for the same reason: on a dry run
142-
# every job above is skipped, and "nothing failed" would otherwise be true.
121+
# The guard is `no job failed`, not the default `every job succeeded`: on a dry
122+
# run every job above is skipped, which would make plain success() false too --
123+
# `!inputs.dry-run` is what actually gates this job then, and `no job failed`
124+
# is what confirms nothing above it errored on a real run.
143125
promote:
144-
needs: [prepare, assets, publish-to-testpypi, publish-to-pypi]
126+
needs: [prepare, assets, publish-to-pypi]
145127
if: ${{ !inputs.dry-run && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
146128
uses: reqstool/.github/.github/workflows/common-release-promote.yml@main
147129
permissions:

0 commit comments

Comments
 (0)