Skip to content

Merge branch 'release/v0.5.1' #7

Merge branch 'release/v0.5.1'

Merge branch 'release/v0.5.1' #7

Workflow file for this run

name: Publish to PyPI
on:
push:
tags:
- 'v*.*.*' # Trigger on version tags like v0.4.1
jobs:
test-before-publish:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: pip install uv
- name: Set up environment
run: |
uv venv
source .venv/bin/activate
uv pip install -e .[test]
- name: Run tests
run: |
source .venv/bin/activate
python tests/run_tests.py --all --verbose
publish:
needs: test-before-publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build
- name: Check package
run: twine check dist/*
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*