Skip to content

Publish to PyPI and Docker #2

Publish to PyPI and Docker

Publish to PyPI and Docker #2

Workflow file for this run

name: Publish to PyPI
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build
- name: Generate _version.py from git tags
run: python tools/write_version.py
- name: Build package
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}