Skip to content

Commit

Permalink
Switch to cibuildwheel
Browse files Browse the repository at this point in the history
As testpypi upload is failing
  • Loading branch information
jamesrhester authored Feb 7, 2025
1 parent dff5ca0 commit fc30bb7
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,37 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel build
- name: Build internal items
run: cd src; make

- name: Build Package
run: python -m build --wheel
uses: pypa/[email protected]

- name: Upload wheels to artifact
uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.os }}-${{ matrix.python-version }}
path: dist/*.whl
name: cibw-wheel-${{ matrix.os }}-${{ matrix.python-version }}
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

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

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

pypi-publish:
name: Upload release to PyPI
needs: build_package
needs: [ build_package, build_sdist ]
runs-on: ubuntu-latest
#if: startsWith(github.ref, 'refs/tags/') #only tagged releases
environment:
name: testpypi
url: https://test.pypi.org/p/pycifrw/
Expand All @@ -59,7 +69,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
pattern: wheel-*
pattern: cibw-wheel-*
path: dist
merge-multiple: true

Expand Down

0 comments on commit fc30bb7

Please sign in to comment.