Refactor publish step in GitHub Actions workflow
This commit is contained in:
48
.github/workflows/publish.yml
vendored
48
.github/workflows/publish.yml
vendored
@@ -48,31 +48,31 @@ jobs:
|
|||||||
name: wheels-${{ matrix.os }}-${{ matrix.target }}
|
name: wheels-${{ matrix.os }}-${{ matrix.target }}
|
||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
name: Publish to PyPI
|
name: Publish to PyPI
|
||||||
needs: [build_wheels]
|
needs: [build_wheels]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# REMOVED problematic if condition
|
# REMOVED problematic if condition
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install maturin for upload
|
- name: Install maturin for upload
|
||||||
run: pip install maturin
|
run: pip install maturin
|
||||||
|
|
||||||
- name: Download ALL wheels
|
- name: Download ALL wheels
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
- name: Flatten wheels to dist/
|
- name: Flatten wheels to dist/
|
||||||
run: |
|
run: |
|
||||||
find dist -name "*.whl" -exec cp {} dist/ \;
|
find dist -name "*.whl" -exec cp {} dist/ \;
|
||||||
echo "Wheels ready:"
|
echo "Wheels ready:"
|
||||||
ls -la dist/*.whl
|
ls -la dist/*.whl
|
||||||
|
|
||||||
- name: Publish to PyPI
|
- name: Publish to PyPI
|
||||||
env:
|
env:
|
||||||
PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
cd dist
|
cd dist
|
||||||
ls -la *.whl
|
ls -la *.whl
|
||||||
maturin upload --skip-existing --non-interactive
|
maturin upload --skip-existing --non-interactive
|
||||||
|
|||||||
Reference in New Issue
Block a user