publish-aura-manager.yml•2.58 kB
# This workflow will upload a Python Package to PyPI when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Publish Neo4j MCP Aura Manager Package
on:
push:
tags:
- mcp-neo4j-aura-manager-v*
workflow_dispatch: # Allows manual triggering of the workflow
permissions:
contents: read
jobs:
pypi-publish:
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
# Dedicated environments with protections for publishing are strongly recommended.
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
environment:
name: pypi
url: https://pypi.org/project/mcp-neo4j-aura-manager/
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "servers/mcp-neo4j-cloud-aura-api/pyproject.toml"
- name: Build release distributions
run: |
cd servers/mcp-neo4j-cloud-aura-api/
uv build
- name: Publish release
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
cd servers/mcp-neo4j-cloud-aura-api/
uv publish
mcp-registry-publish:
runs-on: ubuntu-latest
needs: pypi-publish
permissions:
id-token: write # For OIDC
contents: read
steps:
- uses: actions/checkout@v4
- name: Download MCP Publisher
run: |
LATEST_VERSION=$(curl -s https://api.github.com/repos/modelcontextprotocol/registry/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
curl -L "https://github.com/modelcontextprotocol/registry/releases/download/${LATEST_VERSION}/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz
- name: Publish to MCP Registry
run: |
chmod +x mcp-publisher
cd servers/mcp-neo4j-cloud-aura-api/
../../mcp-publisher login github-oidc
../../mcp-publisher publish