Skip to content

Python package

Python package #48

Workflow file for this run

name: Python package
permissions:
contents: write
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Install the project
run: uv sync --all-extras --dev --frozen --no-install-project
- name: Run linting
uses: pre-commit/action@v3.0.1
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/')
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
git diff
uv build
uv publish
- name: Make release with docset
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body: |
This is a release for the ${{ github.ref }} tag.
draft: false
prerelease: false
generate_release_notes: true
append_body: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}