Skip to content

build

build #27

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 build with extras
run: |
find dist/*.whl | xargs -I {} uv pip install {}"[transformers, metrics]"
- name: Test build
run: uv run pytest -n auto
- name: Publish package
run: uv publish --token ${{ SECRETS.PYPI_TOKEN }}