-
Notifications
You must be signed in to change notification settings - Fork 5
37 lines (28 loc) · 1000 Bytes
/
Copy pathpublish.yml
File metadata and controls
37 lines (28 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Publish
on:
release:
types: [published]
workflow_dispatch:
permissions:
id-token: write # PyPI Trusted Publishing + mcp-publisher GitHub OIDC
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up uv
uses: astral-sh/setup-uv@v8
- name: Build sdist and wheel
run: uv build
- name: Publish to PyPI (Trusted Publishing)
uses: pypa/gh-action-pypi-publish@release/v1
- name: Install mcp-publisher
run: |
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
- name: Wait for PyPI to index the new release
run: sleep 20
- name: Publish to MCP Registry (GitHub OIDC)
run: |
./mcp-publisher login github-oidc
./mcp-publisher publish