diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 887b242..54b3c24 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,12 @@ jobs: run: pip install --upgrade pip build - name: Build wheel - run: python -m build --wheel + # Output to `wheel-out/` not `dist/`. `dist/` is the org's + # Phase-0 convention dir for tracked catalog artifacts + # (repo.meta.json + mcp-tools.json); twine would reject the + # latter as "unknown distribution format" if the publish + # step uploaded from there. + run: python -m build --wheel --outdir wheel-out - name: Create GitHub Release with wheel attached # `gh release create` is idempotent on already-existing tags @@ -47,7 +52,7 @@ jobs: # a previously cut release. run: | gh release create "${GITHUB_REF_NAME}" \ - dist/*.whl \ + wheel-out/*.whl \ --title "${GITHUB_REF_NAME}" \ --generate-notes env: @@ -59,6 +64,8 @@ jobs: # `id-token: write` permission to mint an OIDC token PyPI # exchanges for a short-lived publish credential. Configured # once on PyPI's side. + with: + packages-dir: wheel-out/ - name: Install mcp-publisher # Pulled fresh on every release; the CLI is small (single Go diff --git a/.gitignore b/.gitignore index a2cc3b5..38c3a57 100644 --- a/.gitignore +++ b/.gitignore @@ -9,9 +9,12 @@ __pycache__/ .DS_Store build/ -# dist/ holds two kinds of artifacts: -# * generated manifests that ARE tracked (repo.meta.json, mcp-tools.json) -# * built wheels / sdists that are NOT tracked (regenerated by `uv build`) -# Track-by-default, then unignore the .whl / .tar.gz outputs. +# dist/ holds the org's Phase-0 contract artifacts only — repo.meta.json +# + the per-repo manifest (e.g. mcp-tools.json) — both tracked. Built +# wheels / sdists live in `wheel-out/` so they don't collide with the +# tracked manifests when the PyPI publish step uploads from a directory. +wheel-out/ +# Belt-and-suspenders: even if a future `python -m build` writes to dist/ +# without the --outdir override, we still don't track the artifacts. dist/*.whl dist/*.tar.gz diff --git a/Makefile b/Makefile index 67fd87b..5ff60d8 100644 --- a/Makefile +++ b/Makefile @@ -61,12 +61,15 @@ check-agents: @echo "check-agents: AGENTS.md present; CLAUDE.md → AGENTS.md ✓" # Build the wheel for a GitHub Release. PEP-517 via the `build` -# front-end; ships pure-Python with no compiled extensions. The -# resulting `dist/m_dev_tools_mcp--py3-none-any.whl` is what -# `gh release create` attaches as a downloadable asset. +# front-end; ships pure-Python with no compiled extensions. Output +# goes to `wheel-out/`, NOT `dist/` — `dist/` is reserved for the +# org's Phase-0 contract artifacts (`dist/repo.meta.json` + +# `dist/mcp-tools.json`), both tracked. Mixing wheel outputs there +# breaks the PyPI publish step (twine rejects `*.json` as "unknown +# distribution format"). build: - $(PYTHON) -m build --wheel + $(PYTHON) -m build --wheel --outdir wheel-out clean: rm -rf .venv .pytest_cache .ruff_cache .mypy_cache build dist/*.egg-info \ - src/*.egg-info dist/*.whl dist/*.tar.gz + src/*.egg-info wheel-out diff --git a/dist/mcp-tools.json b/dist/mcp-tools.json index 5be5b51..54fa68e 100644 --- a/dist/mcp-tools.json +++ b/dist/mcp-tools.json @@ -2,7 +2,7 @@ "$schema": "https://raw.githubusercontent.com/m-dev-tools/.github/main/profile/repo.meta.schema.json", "kind": "m-dev-tools-mcp.tools", "package": "m_dev_tools_mcp", - "version": "0.2.1", + "version": "0.2.2", "tool_count": 3, "tools": [ { diff --git a/pyproject.toml b/pyproject.toml index d590c61..3c8c6e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "m-dev-tools-mcp" -version = "0.2.1" +version = "0.2.2" description = "MCP server for the m-dev-tools org catalog — exposes route_intent, describe, and verify as first-class agent tools." readme = "README.md" license = { text = "AGPL-3.0" } diff --git a/server.json b/server.json index 7b4136d..749dd2d 100644 --- a/server.json +++ b/server.json @@ -8,13 +8,13 @@ "url": "https://github.com/m-dev-tools/m-dev-tools-mcp", "source": "github" }, - "version": "0.2.1", + "version": "0.2.2", "packages": [ { "registryType": "pypi", "registryBaseUrl": "https://pypi.org", "identifier": "m-dev-tools-mcp", - "version": "0.2.1", + "version": "0.2.2", "runtimeHint": "uvx", "transport": { "type": "stdio" diff --git a/src/m_dev_tools_mcp/__init__.py b/src/m_dev_tools_mcp/__init__.py index 1840012..98b236e 100644 --- a/src/m_dev_tools_mcp/__init__.py +++ b/src/m_dev_tools_mcp/__init__.py @@ -1,3 +1,3 @@ """m-dev-tools-mcp — MCP server wrapping the m-dev-tools org catalog.""" -__version__ = "0.2.1" +__version__ = "0.2.2"