Skip to content

Commit 5e1012d

Browse files
claudeZhiXiao-Lin
authored andcommitted
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.
1 parent dae2fc6 commit 5e1012d

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/publish-python.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,12 @@ jobs:
108108
- name: List wheels
109109
run: ls -la dist/
110110

111-
# Upload native wheels to GitHub Releases (NOT to PyPI)
111+
# Upload native wheels to GitHub Releases (NOT to PyPI).
112+
# Guarded by a tag check so workflow_dispatch from a branch can still
113+
# exercise the PyPI publish path for debugging without the GitHub
114+
# Release steps tripping on a missing release name.
112115
- name: Ensure release exists and upload native assets
116+
if: startsWith(github.ref, 'refs/tags/')
113117
env:
114118
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115119
run: |
@@ -124,6 +128,7 @@ jobs:
124128
125129
# Generate manifest with wheel metadata for bootstrap downloader
126130
- name: Generate native wheel manifest
131+
if: startsWith(github.ref, 'refs/tags/')
127132
run: |
128133
python .github/scripts/generate_python_release_manifest.py \
129134
dist \
@@ -132,6 +137,7 @@ jobs:
132137
133138
# Upload manifest to GitHub Releases
134139
- name: Upload manifest to GitHub Releases
140+
if: startsWith(github.ref, 'refs/tags/')
135141
env:
136142
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
137143
run: |
@@ -144,4 +150,4 @@ jobs:
144150
TWINE_PASSWORD: ${{ secrets.PYPI_NATIVE_TOKEN }}
145151
run: |
146152
python -m pip install --upgrade pip twine
147-
python -m twine upload --skip-existing dist/*.whl
153+
python -m twine upload --verbose --skip-existing dist/*.whl

0 commit comments

Comments
 (0)