Skip to content

Add packaging.

Add packaging. #3

Workflow file for this run

name: build & test
on:
push:
branches: [ main ]
tags:
- 'v*'
pull_request:
branches: [ main ]
workflow_call:
permissions:
id-token: write
contents: read
jobs:
test-and-build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install -U uv
uv sync --all-extras
- name: Run tests
run: |
uv run pytest .
- name: Build
run: |
uv build
- name: Upload wheel artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*.whl
- name: Upload to PyPI
if: startsWith(github.ref, 'refs/tags/v')
run: |
uv publish