From 3905010a30804f6c202c0beb549d2e6a86dd71ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dean=20Qui=C3=B1anola?= Date: Fri, 30 Oct 2026 13:59:25 -0700 Subject: [PATCH] fix(ci): build PyPI releases from the release tag 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. --- .github/workflows/cd.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index f8fc7415e..1c2ff0f4d 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -13,6 +13,11 @@ on: options: - "true" - "false" + tag: + description: "Release tag to build when force publishing (e.g. v2.0.0)" + required: false + default: "" + type: string permissions: contents: write @@ -79,9 +84,13 @@ jobs: name: pypi-production url: https://pypi.org/project/runpod/ steps: + # Build the tagged release commit, not the commit that triggered this run. + # The version comes from setuptools_scm, so building a later commit + # publishes a .devN version (2.0.0 shipped as 2.0.1.dev1 this way). - uses: actions/checkout@v7 with: fetch-depth: 0 + ref: ${{ needs.release-please.outputs.tag_name || inputs.tag || github.sha }} - name: Install uv uses: astral-sh/setup-uv@v7