Skip to content

Commit ec3e13f

Browse files
authored
Merge pull request #410 from wudidapaopao/fix_musl_pypi_upload
Fix uploading musl package
2 parents 13f9069 + 1819edc commit ec3e13f

File tree

2 files changed

+33
-13
lines changed

2 files changed

+33
-13
lines changed

.github/workflows/build_musllinux_arm64_wheels.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -331,22 +331,30 @@ jobs:
331331
gh release upload ${{ github.ref_name }} ./dist/*.whl --clobber
332332
env:
333333
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
334+
continue-on-error: true
335+
336+
- name: Setup Python and install twine for PyPI upload
337+
run: |
338+
echo "=== Setting up Python for PyPI upload ==="
339+
python3 --version
340+
python3 -m pip --version
341+
echo "=== Installing twine ==="
342+
python3 -m pip install --upgrade pip
343+
python3 -m pip install twine
344+
if ! python3 -m twine --version; then
345+
echo "ERROR: Twine installation failed!"
346+
exit 1
347+
fi
348+
echo "Twine installed successfully"
349+
ls -la ./dist/
334350
335351
# Upload to PyPI
336-
- name: Upload to PyPI
352+
- name: Upload pypi
337353
if: startsWith(github.ref, 'refs/tags/v')
338-
uses: addnab/docker-run-action@v3
339-
with:
340-
image: quay.io/pypa/musllinux_1_2_aarch64
341-
options: -v ${{ github.workspace }}:/workspace
342-
run: |
343-
cd /workspace
344-
echo "=== Uploading to PyPI ==="
345-
346-
export PATH="$HOME/.pyenv/bin:$PATH"
347-
eval "$(pyenv init -)"
348-
pyenv shell 3.13
349-
python -m twine upload ./dist/*.whl
354+
run: |
355+
echo "=== Uploading to PyPI ==="
356+
ls -la ./dist/
357+
python3 -m twine upload dist/*.whl
350358
env:
351359
TWINE_USERNAME: __token__
352360
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

.github/workflows/build_musllinux_x86_wheels.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,18 @@ jobs:
246246
pyenv shell --unset
247247
done
248248
continue-on-error: false
249+
- name: Install GitHub CLI
250+
run: |
251+
# Install GitHub CLI from binary release (Alpine Linux compatible)
252+
wget https://github.com/cli/cli/releases/download/v2.82.1/gh_2.82.1_linux_amd64.tar.gz -O gh.tar.gz
253+
tar -xf gh.tar.gz
254+
cp gh_*/bin/gh /usr/local/bin/
255+
chmod +x /usr/local/bin/gh
256+
if ! gh --version; then
257+
echo "ERROR: GitHub CLI installation failed!"
258+
exit 1
259+
fi
260+
echo "GitHub CLI installed successfully"
249261
- name: Upload wheels to release
250262
if: startsWith(github.ref, 'refs/tags/v')
251263
run: |

0 commit comments

Comments
 (0)