Build Wheels 2 #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Wheels 2 | |
on: workflow_dispatch | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] #, windows-latest, macos-latest] | |
python-version: [3.9, 3.10, 3.11] | |
steps: | |
- uses: actions/checkout@v4 | |
# - uses: actions/setup-python@v5 | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.21.3 | |
env: | |
CIBW_BUILD_VERBOSITY: 1 | |
CIBW_BEFORE_ALL_LINUX: bash ./instdeps.sh | |
CIBW_BEFORE_ALL_MACOS: brew install libarchive pybind11 | |
CIBW_BUILD_FRONTEND: pip | |
CIBW_SKIP: pp* cp3[6789]* cp310* *win* *i686* *universal2* | |
with: | |
package-dir: . | |
output-dir: wheelhouse | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
path: ./wheelhouse/*.whl | |
release: | |
needs: build_wheels | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: master | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
# unpacks all CIBW artifacts into wheelhouse/ | |
pattern: cibw-* | |
path: wheelhouse | |
merge-multiple: true | |
- name: Publish package to PyPI | |
shell: bash | |
run: | | |
pip install twine | |
export TWINE_USERNAME="__token__" | |
export TWINE_PASSWORD="${{ secrets.PYPI_API_TOKEN }}" | |
twine upload --skip-existing --repository-url https://upload.pypi.org/legacy/ wheelhouse/* --verbose |