BLEA 0.6.2 #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
| name: Release | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: read | |
| env: | |
| MCP_PUBLISHER_VERSION: "1.8.1" | |
| MCP_PUBLISHER_LINUX_AMD64_SHA256: "a06c9096dcb9727c13555b6be26c7effa707b01f06a4c561ba7a3635443cf2cc" | |
| jobs: | |
| build: | |
| name: Build and verify distributions | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 | |
| with: | |
| python-version: "3.13" | |
| - name: Verify tag matches project version | |
| shell: bash | |
| run: | | |
| version="$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')" | |
| test "$GITHUB_REF_NAME" = "v$version" | |
| - run: uv sync --extra dev | |
| - run: uv run python scripts/sync_codex_plugin.py --check | |
| - run: uv run python scripts/check_agent_package.py | |
| - run: uv run python scripts/check_mcp_registry.py | |
| - run: uv run ruff check . | |
| - run: uv run ruff format --check . | |
| - run: uv run pytest | |
| - run: uv build --clear --no-create-gitignore | |
| - run: uv run python scripts/check_distribution.py dist | |
| - run: uv run python scripts/build_openai_skill_bundle.py --output-directory openai-dist | |
| - run: docker build --tag blea-mcp:release . | |
| - run: uvx --from twine twine check dist/* | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: python-package-distributions | |
| path: dist/ | |
| if-no-files-found: error | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: openai-skill-bundle | |
| path: openai-dist/*.zip | |
| if-no-files-found: error | |
| publish: | |
| name: Publish to PyPI | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/blea | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: python-package-distributions | |
| path: dist/ | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| registry: | |
| name: Publish to the official MCP Registry | |
| needs: publish | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install pinned MCP publisher | |
| shell: bash | |
| run: | | |
| archive="mcp-publisher_linux_amd64.tar.gz" | |
| curl --fail --location --silent --show-error \ | |
| --output "$archive" \ | |
| "https://github.com/modelcontextprotocol/registry/releases/download/v${MCP_PUBLISHER_VERSION}/${archive}" | |
| echo "${MCP_PUBLISHER_LINUX_AMD64_SHA256} ${archive}" | sha256sum --check --strict | |
| tar --extract --gzip --file "$archive" | |
| chmod +x mcp-publisher | |
| ./mcp-publisher --version | |
| ./mcp-publisher validate | |
| - name: Wait for the published PyPI ownership marker | |
| shell: bash | |
| run: | | |
| version="$(python -c 'import json; print(json.load(open("server.json"))["version"])')" | |
| for attempt in {1..18}; do | |
| if curl --fail --silent --show-error "https://pypi.org/pypi/blea/${version}/json" \ | |
| | python -c 'import json, sys; assert "<!-- mcp-name: io.github.nitmi/blea -->" in json.load(sys.stdin)["info"]["description"]' | |
| then | |
| exit 0 | |
| fi | |
| if [ "$attempt" -eq 18 ]; then | |
| echo "PyPI did not expose the MCP ownership marker for blea ${version}" >&2 | |
| exit 1 | |
| fi | |
| sleep 10 | |
| done | |
| - name: Publish server metadata with GitHub OIDC | |
| shell: bash | |
| run: | | |
| ./mcp-publisher login github-oidc | |
| ./mcp-publisher publish |