Skip to content

Publish totalreclaw Python client to PyPI #22

Publish totalreclaw Python client to PyPI

Publish totalreclaw Python client to PyPI #22

name: Publish totalreclaw Python client to PyPI
on:
workflow_dispatch:
inputs:
dry-run:
description: 'Dry run (build only, no publish)'
required: false
type: boolean
default: false
jobs:
build:
name: Build Python package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install build tools
run: pip install build
- name: Build sdist and wheel
run: cd python && python -m build
- uses: actions/upload-artifact@v4
with:
name: python-dist
path: python/dist/*
test:
name: Test package
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install and test
run: |
cd python
pip install -e ".[dev]"
python -m pytest tests/ -v \
--ignore=tests/test_staging_integration.py \
--ignore=tests/cross_client_e2e.py \
--ignore=tests/test_cross_client.py \
--ignore=tests/test_embedding.py \
--ignore=tests/test_userop.py \
-x
publish:
name: Publish to PyPI
needs: [build, test]
runs-on: ubuntu-latest
if: inputs.dry-run == false
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: python-dist
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
attestations: false