π The fast, Pythonic way to build MCP servers and clients.
Let maintenance releases publish without fastmcp-tasks (#4676)
Jeremiah Lowinf4ae8bb0af04
diff --git a/.github/workflows/publish-fastmcp-tasks.yml b/.github/workflows/publish-fastmcp-tasks.ymlindex 9aa5326a7..29fc38554 100644--- a/.github/workflows/publish-fastmcp-tasks.yml+++ b/.github/workflows/publish-fastmcp-tasks.yml@@ -23,13 +23,29 @@ jobs:fetch-depth: 0ref: ${{ github.event.workflow_run.head_sha || github.sha }}+ # Maintenance branches predate the standalone fastmcp-tasks package and+ # resolve the `tasks` extra through fastmcp-slim instead. This workflow+ # runs from the default branch for every fastmcp-slim release, including+ # those tags, so detect the package rather than assume it is there.+ - name: Check whether this ref builds fastmcp-tasks+ id: package_present+ run: |+ if [ -d fastmcp_tasks ]; then+ echo "present=true" >> "$GITHUB_OUTPUT"+ else+ echo "present=false" >> "$GITHUB_OUTPUT"+ echo "This ref has no fastmcp_tasks package; nothing to publish."+ fi+- name: Install uvuses: astral-sh/setup-uv@v7- name: Build fastmcp-tasks+ if: steps.package_present.outputs.present == 'true'run: uv build --package fastmcp-tasks- name: Verify matching fastmcp-slim is published+ if: steps.package_present.outputs.present == 'true'run: |SLIM_VERSION=$(python - <<'PY'import email.parser@@ -84,4 +100,5 @@ jobs:exit 1- name: Publish fastmcp-tasks to PyPI+ if: steps.package_present.outputs.present == 'true'run: uv publish -v dist/fastmcp_tasks-*.tar.gz dist/fastmcp_tasks-*.whldiff --git a/.github/workflows/publish-fastmcp.yml b/.github/workflows/publish-fastmcp.ymlindex 52b319d5c..dc32179cb 100644--- a/.github/workflows/publish-fastmcp.yml+++ b/.github/workflows/publish-fastmcp.yml@@ -134,17 +134,24 @@ jobs:# fastmcp-tasks is pinned via the optional `tasks` extra, so its# Requires-Dist entry carries an `extra == "tasks"` marker β unlike the# base slim dependency, do not skip marked entries here.+ #+ # Print nothing when there is no such pin. Release lines that resolve+ # the `tasks` extra through fastmcp-slim instead of a standalone+ # fastmcp-tasks package have nothing here to verify.for value in metadata.get_all("Requires-Dist", []):requirement, _, _marker = value.partition(";")match = re.fullmatch(r"fastmcp-tasks==([^;\s]+)", requirement.strip())if match:print(match.group(1))break- else:- raise RuntimeError("Could not find the fastmcp-tasks extra dependency")PY)+ if [ -z "$TASKS_VERSION" ]; then+ echo "This build does not pin fastmcp-tasks; the [tasks] extra cannot be uninstallable, so there is nothing to verify."+ exit 0+ fi+for attempt in {1..12}; doif python - "$TASKS_VERSION" <<'PY'import json