Skip to content

Commit

Permalink
feat: test pypi upload from CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dhdaines committed Feb 1, 2024
1 parent 6c275ae commit 194d9e4
Showing 1 changed file with 32 additions and 5 deletions.
37 changes: 32 additions & 5 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,55 @@ jobs:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz

build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest] # , windows-latest, macos-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5

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

upload_pypi:
needs:
- build_wheels_linux
- build_sdist
# Comment the next two for testing
# - build_wheels_windows
# - build_wheels_macos
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
# Comment this line for testing
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4
with:
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
# Uncomment these lines for testing
with:
repository-url: https://test.pypi.org/legacy/

0 comments on commit 194d9e4

Please sign in to comment.