Skip to content

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #36

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #36

Workflow file for this run

# Build and publish wheels to PyPI
# Build runs on every push
# Publish runs only on a tag push
# Note: This does not publish sdist
name: Wheels
on: [push, pull_request]
jobs:
build:
name: Build wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: 3.8
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.4.2
- name: Build wheels
env:
# Skipping:
# - PyPy (Mac OS): We get the runtime error "init_dgelsd failed init"
# - Windows (32-bit) and Python 2.7
# Refer: https://cibuildwheel.readthedocs.io/en/stable/cpp_standards/#windows-and-python-27
CIBW_SKIP: pp*-macosx* cp27-win* *-win32
CIBW_BEFORE_TEST: pip install -r test/python/requirements.txt
CIBW_TEST_COMMAND: pytest {project}/test/python
run: |
python -m cibuildwheel --output-dir dist
- uses: actions/upload-artifact@v2
with:
name: dist
path: ./dist
publish:
runs-on: ubuntu-latest
needs: [build]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
steps:
- uses: actions/[email protected]
with:
name: dist
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}