Skip to content

Commit 81199af

Browse files
esteiningerclaude
andcommitted
ci: workflow to publish mixpeek-mcp using python-sdk's PYPI_TOKEN
Checks out mixpeek/mcp-server, builds sdist+wheel, runs twine upload. Triggered manually via gh workflow run publish-mcp.yml, or from the mcp-server orchestrator workflow in the monorepo. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent bf95df7 commit 81199af

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/publish-mcp.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: "Publish mcp-server to PyPI"
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
ref:
7+
description: "Branch/tag/sha of mixpeek/mcp-server to publish"
8+
required: false
9+
default: "main"
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check secret
16+
run: |
17+
if [ -z "${{ secrets.PYPI_TOKEN }}" ]; then
18+
echo "::error::PYPI_TOKEN secret is not configured."
19+
exit 1
20+
fi
21+
22+
- name: Checkout mcp-server
23+
uses: actions/checkout@v4
24+
with:
25+
repository: mixpeek/mcp-server
26+
ref: ${{ github.event.inputs.ref }}
27+
28+
- name: Setup Python
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: "3.11"
32+
33+
- name: Build mixpeek-mcp
34+
run: |
35+
python -m pip install --upgrade pip build twine
36+
python -m build --sdist --wheel
37+
38+
- name: Publish mixpeek-mcp
39+
env:
40+
TWINE_USERNAME: __token__
41+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
42+
run: |
43+
set -e
44+
PKG_VERSION=$(grep -E '^version\s*=' pyproject.toml | head -1 | sed -E 's/.*"([^"]+)".*/\1/')
45+
if curl -sf "https://pypi.org/pypi/mixpeek-mcp/${PKG_VERSION}/json" >/dev/null; then
46+
echo "::notice::mixpeek-mcp==${PKG_VERSION} already on PyPI — skipping"
47+
else
48+
twine upload dist/mixpeek_mcp-${PKG_VERSION}*
49+
echo "::notice::Published mixpeek-mcp==${PKG_VERSION}"
50+
fi

0 commit comments

Comments
 (0)