Skip to content

OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.

Python

Add GitHub Action to publish MCP to PyPI

Edwin Jose82e5abb12534
diff --git a/.github/workflows/publish-mcp.yml b/.github/workflows/publish-mcp.yml
new file mode 100644
index 000000000..9a1fe142d
--- /dev/null
+++ b/.github/workflows/publish-mcp.yml
@@ -0,0 +1,45 @@
+name: Publish MCP (openrag-mcp)
+
+on:
+ push:
+ tags:
+ - 'mcp-v*'
+
+jobs:
+ publish:
+ name: Publish to PyPI
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ working-directory: sdks/mcp
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Set up Python
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.12'
+
+ - name: Install build tools
+ run: pip install build twine
+
+ - name: Extract version from tag
+ id: version
+ run: |
+ VERSION=${GITHUB_REF_NAME#mcp-v}
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
+
+ - name: Update version in pyproject.toml
+ run: |
+ sed -i "s/^version = .*/version = \"${{ steps.version.outputs.version }}\"/" pyproject.toml
+
+ - name: Build package
+ run: python -m build
+
+ - name: Publish to PyPI
+ run: twine upload dist/*
+ env:
+ TWINE_USERNAME: __token__
+ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}