Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ on:
push:
tags:
- 'v*.*.*'
# publishes a released tag's server.json to the MCP Registry, and nothing else
workflow_dispatch:
inputs:
tag:
description: Released tag to list in the MCP Registry (e.g. v2.0.1)
required: true

jobs:
build:
name: Build distributions
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
Expand All @@ -27,6 +34,7 @@ jobs:
publish:
name: Publish to PyPI
needs: build
if: github.event_name == 'push'
runs-on: ubuntu-latest
environment: pypi
permissions:
Expand All @@ -44,6 +52,7 @@ jobs:
github-release:
name: GitHub Release
needs: publish
if: github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -57,3 +66,38 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --notes-file notes.md --verify-tag

mcp-registry:
name: Publish to the MCP Registry
needs: publish
if: ${{ !cancelled() && (needs.publish.result == 'success' || github.event_name == 'workflow_dispatch') }}
runs-on: ubuntu-latest
permissions:
id-token: write
env:
TAG: ${{ inputs.tag || github.ref_name }}
MCP_PUBLISHER: v1.8.1
steps:
- uses: actions/checkout@v7
with:
ref: ${{ env.TAG }}

- name: Install mcp-publisher
run: curl -fsSL "https://github.com/modelcontextprotocol/registry/releases/download/$MCP_PUBLISHER/mcp-publisher_linux_amd64.tar.gz" | tar xz mcp-publisher

# the registry checks the package on PyPI, which may lag the upload
- name: Wait for the version on PyPI
run: |
version="${TAG#v}"
for _ in $(seq 30); do
curl -fsS "https://pypi.org/pypi/web-algebra/$version/json" > /dev/null && exit 0
sleep 10
done
echo "web-algebra $version is not on PyPI" >&2
exit 1

- name: Log in with GitHub OIDC
run: ./mcp-publisher login github-oidc

- name: Publish server.json
run: ./mcp-publisher publish
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to Web Algebra are recorded here. The format follows
[Semantic Versioning](https://semver.org/). The normative definition of every
operation is [formal-semantics.md](formal-semantics.md).

## [2.0.2] - Unreleased

### Added

- **A release lists itself in the MCP Registry**: the release workflow
publishes `server.json` after the PyPI upload, logged in with GitHub OIDC.
Run by hand with a released tag, it publishes that tag's `server.json` and
nothing else.

## [2.0.1] - 2026-10-21

### Added
Expand Down
Loading