clipwright/.github/workflows/publish-cli.yml
pedro-bento ace54c6e77
Some checks are pending
CI / backend-tests (push) Waiting to run
CI / frontend-build (push) Waiting to run
chore: rename OpenShorts to Clipwright
- Rebrand all text, package/CLI (clipwright_cli), env vars (CLIPWRIGHT_*),
  localStorage keys, Docker container names and webhook header
- Rename/relocate assets, skills/, n8n examples, font map; delete dead MCP
  metadata (server.json, glama.json) and generated egg-info
- Canonical site URL -> https://git.pbento.pt/pedro-bento/clipwright
- Preserve fork provenance (upstream OpenShorts attribution in README/NOTICE/LICENSE)
2026-10-04 18:07:07 +01:00

42 lines
1.2 KiB
YAML

name: Publish CLI to PyPI
# Push a tag cli-vX.Y.Z (matching `version` in cli/pyproject.toml) to publish
# the `clipwright` CLI. Uses PyPI Trusted Publishing (OIDC): no API token.
on:
push:
tags:
- "cli-v*.*.*"
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
contents: read
defaults:
run:
working-directory: cli
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Tag matches cli/pyproject.toml version
if: startsWith(github.ref, 'refs/tags/')
run: |
v=$(python -c "import tomllib;print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
[ "cli-v$v" = "${GITHUB_REF_NAME}" ] || { echo "tag ${GITHUB_REF_NAME} != cli-v$v"; exit 1; }
- name: Build
run: |
pip install build
python -m build
- name: Smoke test the wheel
run: |
pip install dist/*.whl
clipwright --help
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: cli/dist/