Skip to content

only tags on main are pushed to pypi #21

only tags on main are pushed to pypi

only tags on main are pushed to pypi #21

# This workflow will
# - build distribution package, pure python wheel
# - publish produced distribution package to PyPI
#
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Publish Python Package
on:
workflow_dispatch:
push:
branches: [main]
tags:
- 'v*'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies and build
run: |
pip install -e '.[dev]'
python -m build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_PASSWORD }}