Skip to content

Commit

Permalink
Use wheels from cibuildwheel in publish-package
Browse files Browse the repository at this point in the history
  • Loading branch information
asmeurer committed Sep 16, 2024
1 parent a0e42a6 commit 0114550
Showing 1 changed file with 36 additions and 3 deletions.
39 changes: 36 additions & 3 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ jobs:
- name: Install dependencies
run: python -m pip install -r requirements-dev.txt

- name: Build a wheel and a sdist
- name: Build an sdist
run: |
PYTHONWARNINGS=error,default::DeprecationWarning python -m build .
PYTHONWARNINGS=error,default::DeprecationWarning python -m build --sdist .
- name: Verify the distribution
run: twine check --strict dist/*
Expand All @@ -67,10 +67,36 @@ jobs:
name: dist-artifact
path: dist

wait_for_wheels:
name: Wait for wheels
needs: build
runs-on: ubuntu-latest
steps:
- name: Wait for build-wheels workflow
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: 'Build wheels on ubuntu-latest'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10

download_wheels:
name: Download wheels
needs: wait_for_wheels
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
pattern: cibw-wheels-*
path: dist
merge-multiple: true

publish:
name: Publish Python distribution to (Test)PyPI
if: github.event_name != 'pull_request' && github.repository == 'Quansight-Labs/ndindex'
needs: build
needs: [build, download_wheels]
runs-on: ubuntu-latest
# Mandatory for publishing with a trusted publisher
# c.f. https://docs.pypi.org/trusted-publishers/using-a-publisher/
Expand All @@ -88,6 +114,13 @@ jobs:
name: dist-artifact
path: dist

- name: Download wheel artifacts
uses: actions/download-artifact@v4
with:
pattern: cibw-wheels-*
path: dist
merge-multiple: true

- name: List all files
run: ls -lh dist

Expand Down

0 comments on commit 0114550

Please sign in to comment.