Fix token variable for PyPI upload in workflow
This commit is contained in:
13
.github/workflows/publish.yml
vendored
13
.github/workflows/publish.yml
vendored
@@ -57,23 +57,28 @@ jobs:
|
|||||||
|
|
||||||
- name: Flatten and upload
|
- name: Flatten and upload
|
||||||
env:
|
env:
|
||||||
PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} # ← CORRECT TOKEN VAR
|
||||||
run: |
|
run: |
|
||||||
mkdir -p dist/flattened
|
mkdir -p dist/flattened
|
||||||
rm -rf dist/flattened/* # Clear
|
rm -rf dist/flattened/*
|
||||||
|
|
||||||
# Copy EVERY wheel from EVERY subdir
|
# Copy EVERY wheel
|
||||||
find dist -name "*.whl" | while read wheel; do
|
find dist -name "*.whl" | while read wheel; do
|
||||||
cp "$wheel" dist/flattened/
|
cp "$wheel" dist/flattened/
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "=== TOTAL WHEELS (should be 9+) ==="
|
echo "=== TOTAL WHEELS ==="
|
||||||
ls -la dist/flattened/*.whl | wc -l
|
ls -la dist/flattened/*.whl | wc -l
|
||||||
|
|
||||||
cd dist/flattened
|
cd dist/flattened
|
||||||
echo "=== UPLOADING $(ls *.whl | wc -l) WHEELS ==="
|
echo "=== UPLOADING $(ls *.whl | wc -l) WHEELS ==="
|
||||||
ls -la *.whl | head -5
|
ls -la *.whl | head -5
|
||||||
|
|
||||||
|
# TWINE fallback (double protection)
|
||||||
|
export TWINE_USERNAME=__token__
|
||||||
|
export TWINE_PASSWORD=${{ secrets.PYPI_API_TOKEN }}
|
||||||
maturin upload --skip-existing --non-interactive *.whl
|
maturin upload --skip-existing --non-interactive *.whl
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user