Skip to main content
Glama
publish.yml2.84 kB
name: Publish to PyPI on: release: types: [published] workflow_dispatch: inputs: version: description: 'Version to publish (leave empty to use pyproject.toml version)' required: false env: PYTHON_VERSION: "3.11" jobs: authorize: name: Authorize runs-on: ubuntu-latest outputs: is_admin: ${{ steps.check.outputs.is_admin }} steps: - name: Check if user is admin id: check uses: actions/github-script@v7 with: script: | const { data: permission } = await github.rest.repos.getCollaboratorPermissionLevel({ owner: context.repo.owner, repo: context.repo.repo, username: context.actor }); const isAdmin = permission.permission === 'admin'; console.log(`User ${context.actor} has permission: ${permission.permission}`); console.log(`Is admin: ${isAdmin}`); if (!isAdmin) { core.setFailed(`User ${context.actor} is not an admin. Only admins can publish packages.`); } core.setOutput('is_admin', isAdmin); build: name: Build distribution needs: authorize runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: ${{ env.PYTHON_VERSION }} - name: Install build dependencies run: | python -m pip install --upgrade pip pip install build twine - name: Build package run: python -m build - name: Check package run: twine check dist/* - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: dist path: dist/ publish-pypi: name: Publish to PyPI needs: build runs-on: ubuntu-latest environment: name: pypi url: https://pypi.org/p/shepherd-mcp permissions: id-token: write steps: - name: Download artifacts uses: actions/download-artifact@v4 with: name: dist path: dist/ - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 verify: name: Verify installation needs: publish-pypi runs-on: ubuntu-latest steps: - name: Set up Python uses: actions/setup-python@v5 with: python-version: ${{ env.PYTHON_VERSION }} - name: Wait for PyPI run: sleep 60 - name: Install from PyPI run: pip install shepherd-mcp - name: Verify installation run: | python -c "import shepherd_mcp; print(shepherd_mcp.__version__)" shepherd-mcp --help || echo "CLI available"

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/neuralis-in/shepherd-mcp'

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