Retry the live tool call when the free plan's concurrency limit trips #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Publishes the npm and PyPI wrapper packages on a version tag, using OIDC | |
| # trusted publishing. No NPM_TOKEN or PYPI_TOKEN is stored anywhere: GitHub | |
| # mints a short-lived OIDC token per run, and npmjs.org / pypi.org accept it | |
| # because this repo + workflow are configured as trusted publishers. | |
| # | |
| # One-time setup, done once per package on the registries (not in this repo): | |
| # npmjs.org -> package settings -> Trusted Publisher -> GitHub Actions, | |
| # repo HasData/zillow-mcp, workflow publish.yml | |
| # pypi.org -> the hasdata org -> Publishing -> add a trusted publisher | |
| # (pending publisher works before the first release), | |
| # repo HasData/zillow-mcp, workflow publish.yml | |
| # | |
| # The MCP registry entry (com.hasdata/zillow) is NOT published here. It uses | |
| # domain auth, which would need the namespace-wide Ed25519 key as a secret in | |
| # every repo. That key stays off CI; the registry entry is published by hand | |
| # when server.json changes, after the package versions below are live. | |
| # | |
| # Release: bump nothing by hand. Tag the commit `vX.Y.Z` and push the tag; the | |
| # tag is the single source of the version and is written into both manifests. | |
| name: publish | |
| on: | |
| push: | |
| tags: ['v*.*.*'] | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| npm: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # No registry-url here on purpose. With it, setup-node writes an .npmrc | |
| # carrying _authToken=${NODE_AUTH_TOKEN}, which resolves to a placeholder | |
| # when no token is passed. npm then authenticates with that garbage instead | |
| # of falling back to OIDC, and a scoped package answers 404. | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| # OIDC trusted publishing landed in npm 11.5.1. Node 24 already ships a | |
| # newer npm than that, but pinning the upgrade here keeps the job working | |
| # if the runner image drifts back. | |
| - name: Upgrade npm for OIDC trusted publishing | |
| run: | | |
| npm install -g npm@latest | |
| npm -v | |
| - name: Set version from the tag | |
| run: npm version "${GITHUB_REF_NAME#v}" --no-git-tag-version --allow-same-version | |
| - name: Publish to npm (OIDC, no token) | |
| run: npm publish --access public | |
| pypi: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Set version from the tag | |
| run: | | |
| python - "${GITHUB_REF_NAME#v}" <<'PY' | |
| import re, sys | |
| v = sys.argv[1] | |
| p = "pyproject.toml" | |
| t = open(p, encoding="utf-8").read() | |
| t = re.sub(r'(?m)^version = ".*"$', f'version = "{v}"', t, count=1) | |
| open(p, "w", encoding="utf-8", newline="\n").write(t) | |
| PY | |
| - name: Build the wheel and sdist | |
| run: pipx run build | |
| - name: Publish to PyPI (OIDC, no token) | |
| uses: pypa/gh-action-pypi-publish@release/v1 |