From 2b73ec34f24fe1b2a792ee15f8932c6cf5ea66e4 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 24 May 2026 09:12:56 +0800 Subject: [PATCH] ci(publish-python): twine upload --verbose to expose 400 cause The v3.2.0 release fails on the second wheel upload to PyPI with a generic 400 Bad Request. twine swallows the response body unless --verbose is set; this commit adds the flag so the next retry surfaces the actual reason from PyPI. --- .github/workflows/publish-python.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-python.yml b/.github/workflows/publish-python.yml index 2c6975e..5f01c8c 100644 --- a/.github/workflows/publish-python.yml +++ b/.github/workflows/publish-python.yml @@ -108,8 +108,12 @@ jobs: - name: List wheels run: ls -la dist/ - # Upload native wheels to GitHub Releases (NOT to PyPI) + # Upload native wheels to GitHub Releases (NOT to PyPI). + # Guarded by a tag check so workflow_dispatch from a branch can still + # exercise the PyPI publish path for debugging without the GitHub + # Release steps tripping on a missing release name. - name: Ensure release exists and upload native assets + if: startsWith(github.ref, 'refs/tags/') env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -124,6 +128,7 @@ jobs: # Generate manifest with wheel metadata for bootstrap downloader - name: Generate native wheel manifest + if: startsWith(github.ref, 'refs/tags/') run: | python .github/scripts/generate_python_release_manifest.py \ dist \ @@ -132,6 +137,7 @@ jobs: # Upload manifest to GitHub Releases - name: Upload manifest to GitHub Releases + if: startsWith(github.ref, 'refs/tags/') env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -144,4 +150,4 @@ jobs: TWINE_PASSWORD: ${{ secrets.PYPI_NATIVE_TOKEN }} run: | python -m pip install --upgrade pip twine - python -m twine upload --skip-existing dist/*.whl + python -m twine upload --verbose --skip-existing dist/*.whl