Skip to content

pyKVFinder v0.7.2

pyKVFinder v0.7.2 #46

Workflow file for this run

name: Build and deploy
on:
release:
types: [published]
workflow_dispatch:
jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Build sdist
run: |
pipx run build --sdist
- name: Test sdist
run: |
pip install pytest
pip install dist/*.tar.gz
pytest tests/integration -v
- uses: actions/upload-artifact@v3
with:
name: artifacts
path: dist/*.tar.gz
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [macos-latest, macos-13, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
# Used to host cibuildwheel
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.22.0
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v3
with:
name: artifacts
path: ./wheelhouse/*.whl
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
needs: [build_sdist, build_wheels]
environment:
name: pypi
url: https://pypi.org/p/pyKVFinder
permissions:
id-token: write
steps:
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: actions/download-artifact@v3
with:
name: artifacts
path: ./dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}