Skip to main content
Glama
publish.yml2.51 kB
name: Publish to PyPI on: push: branches: - main paths: - 'pyproject.toml' permissions: contents: write id-token: write # Required for trusted publishing to PyPI jobs: publish: runs-on: ubuntu-latest environment: name: pypi steps: - name: Checkout uses: actions/checkout@c2d88d3ecc89a9ef08eebf45d9637801dcee7eb5 with: fetch-depth: 0 # Fetch all history for proper tagging - name: Extract version from pyproject.toml id: get_version run: | VERSION=$(grep -E '^version = ' pyproject.toml | sed -E 's/version = "(.*)"/\1/') echo "version=$VERSION" >> $GITHUB_OUTPUT echo "Detected version: $VERSION" - name: Check if tag exists id: check_tag run: | if git rev-parse "v${{ steps.get_version.outputs.version }}" >/dev/null 2>&1; then echo "exists=true" >> $GITHUB_OUTPUT echo "Tag v${{ steps.get_version.outputs.version }} already exists" else echo "exists=false" >> $GITHUB_OUTPUT echo "Tag v${{ steps.get_version.outputs.version }} does not exist" fi - name: Create and push tag if: steps.check_tag.outputs.exists == 'false' run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git tag -a "v${{ steps.get_version.outputs.version }}" -m "Release version ${{ steps.get_version.outputs.version }}" git push origin "v${{ steps.get_version.outputs.version }}" - name: Install uv if: steps.check_tag.outputs.exists == 'false' uses: astral-sh/setup-uv@v6 - name: Install Python 3.13 if: steps.check_tag.outputs.exists == 'false' run: uv python install 3.13 - name: Build if: steps.check_tag.outputs.exists == 'false' run: uv build # Check that basic features work and we didn't miss to include crucial files - name: Smoke test (wheel) if: steps.check_tag.outputs.exists == 'false' run: uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py - name: Smoke test (source distribution) if: steps.check_tag.outputs.exists == 'false' run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py - name: Publish to PyPI if: steps.check_tag.outputs.exists == 'false' run: uv publish

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yeison-liscano/http_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server