Skip to content

Add a correct way to input a numpy array #10

Add a correct way to input a numpy array

Add a correct way to input a numpy array #10

Workflow file for this run

name: build wheels
#trigger on PR and only if something is tagged on branches
on:
push:
branches: ["*"]
tags: ["*"]
pull_request:
branches: ["*"]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macOS-11]
steps:
- uses: actions/checkout@v3
# Used to host cibuildwheel
- uses: actions/setup-python@v3
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.12.2
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v3
with:
name: wheels
path: ./wheelhouse/*.whl
publish:
name: Publish to PyPI
needs: build_wheels
runs-on: ubuntu-latest
#Only publish to PyPI when a commit is tagged
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/download-artifact@v3
with:
name: wheels
path: wheelhouse
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
# construct the source package and upload src and wheels to PiPy
run: |
python -m pip install twine
python setup.py sdist
twine upload dist/*
twine upload wheelhouse/*.whl