v0.8.4 #86
Workflow file for this run
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_deploy | |
on: | |
release: | |
types: [published] | |
jobs: | |
build_extension: | |
name: Build extension | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Create virtual environment and install dependencies | |
run: | | |
python -m venv venv | |
source venv/bin/activate | |
python -m pip install --upgrade pip setuptools Cython numpy | |
- name: Build Cython extensions | |
run: | | |
source venv/bin/activate | |
python setup.py build_ext --inplace | |
make_sdist: | |
needs: build_extension | |
name: Make source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Create virtual environment and install dependencies | |
run: | | |
python -m venv venv | |
source venv/bin/activate | |
python -m pip install --upgrade pip setuptools Cython numpy | |
- name: Build source distribution | |
run: | | |
source venv/bin/activate | |
python setup.py sdist | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: dist/*.tar.gz | |
build_wheels: | |
needs: make_sdist | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04, windows-2019, macos-12 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install Cython | |
python -m pip install numpy | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.18.0 | |
with: | |
platforms: "auto" | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
publish-to-pypi: | |
needs: [ build_wheels, make_sdist ] | |
name: Publish to PyPI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: dist | |
- name: Publish distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |