mirror of
https://github.com/upstash/context7.git
synced 2026-09-14 19:09:34 +08:00
6255e26677
* init sdk and monorepo * init sdk and monorepo * comment cleanup * remove bun.lock * cleanup: remove sdk package and deps * update tsconfigs * chore: add temp changelog * ci: update scripts * ci: update github workflows * fmt: workflows * fix: search libraries response type * ci: update pack-mcpb script * update keywords and author * update eslint config for mcp * include license and readme in build * update release.yaml * add readme symlink * include readme in mcp package * chore: add canary release workflow and update configs * chore: format files * ci: add changeset check workflow * canary release trigger * ci: login to npm before release * bump mcp version on package * remove pr trigger from canary release * ci: remove package input * add mcp lint command * update format scripts
55 lines
1.7 KiB
YAML
55 lines
1.7 KiB
YAML
name: Publish to MCP Registry
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: "Version to publish (defaults to package.json version)"
|
|
required: false
|
|
type: string
|
|
|
|
jobs:
|
|
publish-mcp:
|
|
name: Publish to MCP Registry
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
id-token: write # Required for OIDC authentication with MCP Registry
|
|
contents: read
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: lts/*
|
|
|
|
- name: Set version
|
|
run: |
|
|
if [ -n "${{ inputs.version }}" ]; then
|
|
VERSION="${{ inputs.version }}"
|
|
# Remove 'v' prefix if it exists
|
|
VERSION="${VERSION#v}"
|
|
else
|
|
VERSION=$(node -p "require('./packages/mcp/package.json').version")
|
|
fi
|
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
|
echo "Publishing version: $VERSION"
|
|
|
|
- name: Update package version in server.json
|
|
run: |
|
|
echo $(jq --arg v "${{ env.VERSION }}" '.version = $v | .packages[0].version = $v' server.json) > server.json
|
|
|
|
- name: Validate server.json
|
|
run: npx mcp-registry-validator validate server.json
|
|
|
|
- name: Install MCP Publisher
|
|
run: |
|
|
curl -L "https://github.com/modelcontextprotocol/registry/releases/download/v1.3.3/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
|
|
|
|
- name: Login to MCP Registry
|
|
run: ./mcp-publisher login github-oidc
|
|
|
|
- name: Publish to MCP Registry
|
|
run: ./mcp-publisher publish
|