From a40a254ed1d87980d22411d47ebc30abcf2d4f1b Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Wed, 10 Jun 2026 15:16:36 -0700 Subject: [PATCH] Drive wheel build mode from `kind` instead of an arbitrary `cmd` input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit package-action.yml accepted a `kind` input but never used it. Its `cmd` input — what actually decided the wheel build — defaulted to a command that appends a PEP 440 local version (`+dev`) on every build, including release builds called from auto-release.yml. PyPI rejects local versions, so the latest deploy run blew up with "400 The use of local versions in '0.22.13+devd3eddac' is not allowed." Make `kind` the source of truth: kind == release -> python -m build --wheel --outdir dist/ otherwise -> ... --tag-build=+dev ... (existing dev path) Drop the now-redundant `package_command`/`cmd` plumbing from ci.yml, release.yml, and package-action.yml. auto-release.yml already passes kind=release, so the same change fixes the merge-triggered path too. --- .github/workflows/ci.yml | 12 ------------ .github/workflows/package-action.yml | 27 ++++++++++++--------------- .github/workflows/release.yml | 10 ---------- 3 files changed, 12 insertions(+), 37 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c10710b1..faeec295 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,17 +15,6 @@ on: required: false type: string default: dev - package_command: - required: false - type: string - description: Command used to build python package - default: >- - python -m - build - -C--global-option=egg_info - -C--global-option=--tag-build=+dev$(git rev-parse --short HEAD) - --wheel - --outdir dist/ secrets: PRIVATE_KEY: required: false @@ -72,7 +61,6 @@ jobs: - pre-commit with: kind: "${{ inputs.kind }}" - cmd: "${{ inputs.package_command }}" build-native: name: Python Native Builds diff --git a/.github/workflows/package-action.yml b/.github/workflows/package-action.yml index a151da7b..da4f70fd 100644 --- a/.github/workflows/package-action.yml +++ b/.github/workflows/package-action.yml @@ -7,17 +7,7 @@ on: required: false type: string default: dev - cmd: - required: false - type: string - description: Command used to build python package - default: >- - python -m - build - -C--global-option=egg_info - -C--global-option=--tag-build=dev$(git rev-parse --short HEAD) - --wheel - --outdir dist/ + description: "'release' produces a clean PEP 440 version; anything else tags the build with +dev." outputs: version: value: "${{ jobs.build.outputs.version }}" @@ -67,11 +57,18 @@ jobs: pkginfo --user - - name: Echo Build Wheel Command - run: echo "${{ inputs.cmd }}" + - name: Build Release Wheel + if: inputs.kind == 'release' + run: python -m build --wheel --outdir dist/ - - name: Build Wheel - run: "${{ inputs.cmd }}" + - name: Build Dev Wheel + if: inputs.kind != 'release' + run: >- + python -m build + -C--global-option=egg_info + -C--global-option=--tag-build=+dev$(git rev-parse --short HEAD) + --wheel + --outdir dist/ - name: Python Build Artifact uses: actions/upload-artifact@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 42536697..1418d509 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,15 +7,6 @@ on: required: false type: string default: dev - package_command: - required: false - type: string - description: Command used to build python package - default: >- - python -m - build - --wheel - --outdir dist/ jobs: ci: @@ -28,6 +19,5 @@ jobs: if: contains('["dwoz", "twangboy", "dmurhpy18"]', github.actor) with: kind: "${{ inputs.kind }}" - package_command: "${{ inputs.package_command }}" secrets: PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}