From e350657cac6a2e63f373088bd713b9d3e2aa7d04 Mon Sep 17 00:00:00 2001 From: Ashmit Biswas Date: Sun, 31 May 2026 07:03:33 +0530 Subject: [PATCH] infra: rename distribution to canopy-cli + add PyPI publish workflow - pyproject.toml: name=canopy-cli (canopy is taken on PyPI), add classifiers + project.urls - .github/workflows/publish.yml: tag-triggered build + OIDC publish via trusted publisher - CLI command names (canopy, canopy-mcp) unchanged --- .github/workflows/publish.yml | 36 +++++++++++++++++++++++++++++++++++ pyproject.toml | 20 +++++++++++++++++-- 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..cc54c88 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,36 @@ +name: Publish to PyPI + +on: + push: + tags: + - "v*" + +jobs: + build-and-publish: + name: Build and publish to PyPI + runs-on: ubuntu-latest + permissions: + id-token: write # OIDC for PyPI trusted publishing + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Build sdist and wheel + run: | + python -m pip install --upgrade pip build + python -m build + + - name: Verify version matches tag + run: | + TAG_VERSION="${GITHUB_REF_NAME#v}" + PKG_VERSION=$(python -c "import re,pathlib; print(re.search(r'__version__\s*=\s*\"([^\"]+)\"', pathlib.Path('src/canopy/__init__.py').read_text()).group(1))") + if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then + echo "::error::Tag v$TAG_VERSION does not match __version__ ($PKG_VERSION)" + exit 1 + fi + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/pyproject.toml b/pyproject.toml index 7188920..6b192f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,18 +3,34 @@ requires = ["hatchling"] build-backend = "hatchling.build" [project] -name = "canopy" +name = "canopy-cli" dynamic = ["version"] -description = "Workspace-first development orchestrator" +description = "Workspace-first development orchestrator for AI coding agents" readme = "README.md" requires-python = ">=3.10" license = "MIT" +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Software Development :: Version Control :: Git", +] + dependencies = [ "tomli>=2.0; python_version < '3.11'", "mcp>=1.0", "rich>=13.0", ] +[project.urls] +Homepage = "https://github.com/ashmitb95/canopy" +Source = "https://github.com/ashmitb95/canopy" +Issues = "https://github.com/ashmitb95/canopy/issues" + [project.optional-dependencies] graph = [ "networkx>=3.0",