Skip to content

Publish

Publish #1

Workflow file for this run

name: Publish
on:
release:
types:
- created
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- uses: actions/cache@v4
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-publish
- name: Install build dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: uv pip install --system build
- name: Install Hatch project manager
run: uv pip install --system hatch
- name: Build distribution
run: hatch build
- name: Publish
uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_API_TOKEN }}