Skip to content

Remove setup_win.py and fix supported Pythons #322

Remove setup_win.py and fix supported Pythons

Remove setup_win.py and fix supported Pythons #322

Workflow file for this run

name: Build Windows Python package
on:
push:
pull_request:
release:
types:
- created
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
architecture: [x64, x86]
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
architecture: ${{ matrix.architecture }}
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel twine cython
- name: Build Python wheel
run: |
python setup.py bdist_wheel
- name: Upload artifacts for inspection
uses: actions/upload-artifact@v3
with:
name: wheel_${{ matrix.os }}_${{ matrix.architecture }}_${{ matrix.python-version }}
path: dist/*.whl
- name: Publish sdists and wheels to PyPI
if: ${{ success() && github.event_name == 'release' && github.event.action == 'created' }}
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }}
run: |
twine upload dist/*