Skip to content

fix(ci): build PyPI releases from the release tag - #665

Open
deanq wants to merge 1 commit into
mainfrom
deanq/publish-from-release-tag
Open

deanq wants to merge 1 commit into
mainfrom
deanq/publish-from-release-tag

Conversation

@deanq

@deanq deanq commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

The 2.0.0 release went to PyPI as runpod 2.0.1.dev1, not 2.0.0.

What happened

Checked locally: setuptools_scm gives 2.0.0 at v2.0.0 and 2.0.1.dev1 at a4ba078.

Change

  • pypi-publish checks out needs.release-please.outputs.tag_name, so a release always builds from its tag.
  • A new tag input on workflow_dispatch lets a force publish build a given tag.
  • Without either, it falls back to the triggering commit, as before.

Status

The 2.0.0 fallout has since been cleaned up by hand: runpod 2.0.0 was force-published from its tag on 2026-10-30, and 2.0.1.dev1 is yanked. Releases 2.1.0 through 2.2.1 published correctly because CD happened to run on each release commit.

This change is still needed as a guardrail: pypi-publish on main still checks out the triggering commit, so any release whose CD run is triggered by a later push (for example after a CD outage, as with 2.0.0) would publish a .devN version again.

Test plan

  • Workflow YAML parses; checkout ref and the tag input are as listed
  • setuptools_scm version at v2.0.0 is 2.0.0
  • PyPI: 2.0.0 is published and 2.0.1.dev1 is yanked (done by hand, no longer needed from this PR)

@deanq
deanq temporarily deployed to pypi-production October 30, 2026 21:16 — with GitHub Actions Inactive
@deanq
deanq force-pushed the deanq/publish-from-release-tag branch 4 times, most recently from 4dcb29b to 536cb5a Compare November 11, 2026 00:51
@deanq
deanq requested a balanced review from Copilot November 11, 2026 01:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the release-tag-aware PyPI publishing change.

No open issues 🎉

What changed in this PR

Updates PyPI publishing to build from the release tag, preventing later triggering commits from producing unintended .devN package versions.

Changes:

  • Uses the release-please tag as the preferred checkout reference.
  • Adds an optional tag input for manual force publishing.
  • Preserves the triggering commit as the fallback when neither tag is provided.
File Description
.github/​workflows/​cd.yml Adds the manual tag input and tag-aware checkout for production PyPI publishing.

Review effort: Balanced

@deanq
deanq force-pushed the deanq/publish-from-release-tag branch 4 times, most recently from 283a3af to d9b51ae Compare November 11, 2026 21:12
The 2.0.0 release was tagged at the release PR's merge commit, but the
CD run that created it was triggered by the next push (#661). The
publish job checked out the triggering commit, so setuptools_scm
versioned the build 2.0.1.dev1 and that went to PyPI instead of 2.0.0.

Check out release-please's tag_name, or a new tag input when force
publishing by hand, and fall back to the triggering commit.
@deanq
deanq force-pushed the deanq/publish-from-release-tag branch from d9b51ae to 3489d0c Compare November 11, 2026 21:40

This branch was previously deployed

1 inactive (outdated) deployment
pypi-production — 3905010a Deployed Oct 30, 2026 by deanq via PyPI Publish #118
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants