OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.
Python
Use uv for build/publish and add version check
Edwin Josea7959556110e
diff --git a/.github/workflows/publish-mcp.yml b/.github/workflows/publish-mcp.ymlindex dffa2b2b6..ce0ff48df 100644--- a/.github/workflows/publish-mcp.yml+++ b/.github/workflows/publish-mcp.yml@@ -21,28 +21,39 @@ jobs:uses: actions/checkout@v4- name: Set up Python- uses: actions/setup-python@v5+ uses: actions/setup-python@v6with:python-version: '3.12'- - name: Install build tools- run: pip install build twine+ - name: Install uv+ uses: astral-sh/setup-uv@v4- - name: Extract version from tag+ - name: Extract version from pyproject.tomlid: versionrun: |- VERSION=${GITHUB_REF_NAME#mcp-v}+ VERSION=$(grep -Po '(?<=^version = ")[^"]*' pyproject.toml)echo "version=$VERSION" >> $GITHUB_OUTPUT- - name: Update version in pyproject.toml+ - name: Check if version already published+ id: checkrun: |- sed -i "s/^version = .*/version = \"${{ steps.version.outputs.version }}\"/" pyproject.toml+ HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" https://pypi.org/pypi/openrag-mcp/${{ steps.version.outputs.version }}/json)+ if [ "$HTTP_STATUS" = "200" ]; then+ echo "exists=true" >> $GITHUB_OUTPUT+ else+ echo "exists=false" >> $GITHUB_OUTPUT+ fi- name: Build package- run: python -m build+ if: steps.check.outputs.exists == 'false'+ run: uv build- name: Publish to PyPI- run: twine upload dist/*+ if: steps.check.outputs.exists == 'false'+ run: uv publishenv:- TWINE_USERNAME: __token__- TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}+ UV_PUBLISH_TOKEN: ${{ secrets.UV_PUBLISH_TOKEN }}++ - name: Skip publish (version exists)+ if: steps.check.outputs.exists == 'true'+ run: echo "Version ${{ steps.version.outputs.version }} already exists on PyPI, skipping publish"diff --git a/sdks/mcp/pyproject.toml b/sdks/mcp/pyproject.tomlindex d5c371857..6e80a805e 100644--- a/sdks/mcp/pyproject.toml+++ b/sdks/mcp/pyproject.toml@@ -1,6 +1,6 @@[project]name = "openrag-mcp"-version = "0.1.1"+version = "0.1.0"description = "MCP server for OpenRAG"readme = "README.md"requires-python = ">=3.10"