Skip to content

upload to pypi (#147) #18

upload to pypi (#147)

upload to pypi (#147) #18

Workflow file for this run

name: Build Package
on: push
jobs:
build:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-11]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel twine
pip install Cython==0.29.30
pip install numpy==1.21.6 cibuildwheel
- name: Build sdist
run: python setup.py sdist --formats=zip
- name: Build wheels
run: |
python -m cibuildwheel --output-dir dist/
env:
CIBW_BUILD: "cp37* cp38* cp39* cp310*"
CIBW_SKIP: "*_i686 *musllinux* pp*"
- name: Upload Distributions
uses: actions/upload-artifact@v3
with:
name: dist
path: |
dist/*.whl
dist/*.tar.gz
dist/*.zip
retention-days: 7
publish:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v2
- name: Publish distribution
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}