Skip to content

Commit

Permalink
test separate artifacts for every step
Browse files Browse the repository at this point in the history
  • Loading branch information
jmrohwer committed Feb 15, 2024
1 parent f1a658e commit 3086272
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/cibuildwheel.yml
Expand Up @@ -26,6 +26,11 @@ jobs:
- name: Build wheels for CPython
uses: pypa/cibuildwheel@v2.16.5

- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
Expand All @@ -42,31 +47,27 @@ jobs:
pip install build
python -m build -s .
upload_artifacts:
needs: [build_wheels, build_sdist]
name: Upload build artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/upload-artifact@v4
with:
name: wheels_and_tarball
path: |
./dist/*.tar.gz
./wheelhouse/*.whl
name: sdist
path: ./dist/*.tar.gz

upload_pypi:
needs: upload_artifacts
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# to publish when a GitHub Release is created:
if: github.event_name == 'release' && github.event.action == 'released'
# if: github.event_name == 'release' && github.event.action == 'released'
steps:
- uses: actions/download-artifact@v4
with:
name: wheels_and_tarball
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
- name: Display structure of downloaded files
run: ls -lR dist

# - uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
# password: ${{ secrets.PYPI_TOKEN }}
# repository_url: https://test.pypi.org/legacy/

0 comments on commit 3086272

Please sign in to comment.