Skip to content

Publish to PyPI.org #85

Publish to PyPI.org

Publish to PyPI.org #85

Workflow file for this run

name: Publish to PyPI.org
on:
release:
types: [published]
jobs:
pypi:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install uv
uses: astral-sh/setup-uv@v1
with:
uv-version: 'latest'
- name: Cache uv global directory
uses: actions/cache@v4
with:
path: ${{ env.UV_CACHE_DIR }}
key: ${{ runner.os }}-uv-3.11-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-uv-3.11-
- name: Build package
run: |
uv pip install --upgrade build --system
python3 -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}