Skip to content

build

build #26

Workflow file for this run

name: build
on:
workflow_dispatch:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Setup dev dependencies
run: uv sync --only-dev
- name: Build package
run: uv build
- name: Install package with extras
run: |
find dist/*.whl | xargs -I {} pip install {}"[transformers, metrics]"
- name: Test build
run: uv run pytest -n auto
- name: Publish package
run: uv publish --token ${{ SECRETS.PYPI_TOKEN }} --dry-run