Skip to content

update actions versions #84

update actions versions

update actions versions #84

Workflow file for this run

name: CI
on:
push:
branches: ["*"]
tags: ["*"]
pull_request:
branches: ["*"]
jobs:
build_and_push:
name: Build for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.12.1
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BEFORE_TEST: pip install -r requirements-dev.txt
CIBW_TEST_COMMAND: pytest {project}/tests
CIBW_BUILD: cp3{7,8,9,10,11}-{manylinux_x86_64,win_amd64}
- uses: actions/upload-artifact@v4
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
with:
name: wheels
path: wheelhouse/*.whl
publish:
name: Publish to PyPI
needs: build_and_push
runs-on: ubuntu-20.04
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/download-artifact@v4
with:
name: wheels
path: wheelhouse
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
pip install -r requirements.txt
pip install twine
python setup.py sdist
twine upload dist/*
twine upload wheelhouse/*.whl