Skip to content

Python package build and publish #87

Python package build and publish

Python package build and publish #87

Workflow file for this run

name: Python package build and publish
on:
release:
types: [created]
jobs:
deploy:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine
- name: Build wheels
if: matrix.os == 'ubuntu-latest'
uses: RalfG/[email protected]_x86_64
with:
python-versions: 'cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312'
build-requirements: 'cython numpy'
- name: Build wheels for Windows
if: matrix.os == 'windows-latest'
run: |
pip install cibuildwheel
cibuildwheel --output-dir wheelhouse
# You may need to adjust the above command based on your package's specific requirements
- name: Publish wheels to Production PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.ASYNCDB_PYPI_API_TOKEN }}
run: |
twine upload dist/*-manylinux*.whl
twine upload wheelhouse/*.whl