Skip to content

Fix workflow syntax error #74

Fix workflow syntax error

Fix workflow syntax error #74

Workflow file for this run

name: Build and upload to PyPI
on:
push:
pull_request:
release:
types:
- published
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Python
uses: actions/setup-python@v5
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BEFORE_BUILD_LINUX: python -m pip install numpy scipy Cython
CIBW_BEFORE_BUILD_MACOS: unset __PYVENV_LAUNCHER__ && python -m pip install numpy scipy Cython
CIBW_BEFORE_BUILD_WINDOWS: python -m pip install numpy scipy Cython
CIBW_SKIP: "pp* *-win32 *-manylinux_i686 cp313-* cp37-win* cp37-macosx* cp38-win* cp38-macosx* cp39-win* cp39-macosx* cp310-win* cp310-macosx*"
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m pip install setuptools
- name: Build sdist
run: python setup.py sdist
- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi }}