Skip to content

publish

publish #10

Workflow file for this run

name: publish
on:
release:
types:
- released
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}
fetch-depth: 1
fetch-tags: false
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
with:
python-version: 3.12
- name: Install
run: uv sync --all-groups --all-extras --frozen --no-python-downloads
- name: Lint
run: uv run ruff check --output-format=github ./src ./tests
- name: Test
run: uv run pytest --rootdir= ./tests --doctest-modules --junitxml=junit/test-results.xml
- name: Publish
env:
PUBLISH_VERSION: ${{ github.event.release.tag_name }}
# force set tag on whatever is checked out to ensure proper version pick
run: git tag --force $PUBLISH_VERSION && uv build && uv publish