Skip to content

add workflow to build pypi #1

add workflow to build pypi

add workflow to build pypi #1

Workflow file for this run

name: Build and Publish
on:
push:
tags:
- 'v*.*.*' # Trigger on version tags
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9, 3.10, 3.11]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install cibuildwheel==2.3.0
- name: Build wheels
run: |
cibuildwheel --output-dir wheelhouse
- name: Upload wheels to PyPI
if: startsWith(github.ref, 'refs/tags/')
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install twine
twine upload wheelhouse/*