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