mirror of
https://github.com/koush/scrypted.git
synced 2026-08-03 03:40:45 +01:00
Replace the python-sdk-v* tag trigger with workflow_dispatch so the PyPI publish is kicked off manually. Trusted publishing is unaffected since it binds to the workflow filename and pypi environment, not the trigger type. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
name: Python SDK
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths:
|
|
- "packages/python-client/**"
|
|
- "server/python/**"
|
|
- "sdk/types/scrypted_python/**"
|
|
- ".github/workflows/python-sdk.yml"
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: packages/python-client
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: astral-sh/setup-uv@v5
|
|
- name: Build sdist and wheel
|
|
run: uv build
|
|
- name: Smoke test the wheel
|
|
run: |
|
|
uv venv /tmp/smoke
|
|
uv pip install --python /tmp/smoke/bin/python dist/*.whl
|
|
/tmp/smoke/bin/python -c "import scrypted_sdk; print(scrypted_sdk.connect_scrypted_client)"
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: python-sdk-dist
|
|
path: packages/python-client/dist/
|
|
|
|
publish:
|
|
name: Publish to PyPI
|
|
if: github.event_name == 'workflow_dispatch'
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
environment: pypi
|
|
permissions:
|
|
id-token: write # PyPI trusted publishing
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: python-sdk-dist
|
|
path: dist/
|
|
- uses: pypa/gh-action-pypi-publish@release/v1
|