Skip to content

PyPI

PyPI #44

Workflow file for this run

---
name: PyPI
on: push
jobs:
build-n-publish:
strategy:
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
name: Build and publish Python distribution to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build a binary wheel and a source tarball
run: |
python -mpip install build
python -m build
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags') && startsWith(matrix.python-version, '3.9')
uses: pypa/gh-action-pypi-publish@v1.3.0
with:
password: ${{ secrets.PYPI_PASSWORD }}