We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yigitkonur/latitude-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
name: Publish to npm
on:
push:
branches: [main]
paths-ignore: ['*.md', 'docs/**', 'LICENSE', '.gitignore']
workflow_dispatch:
inputs:
bump:
description: 'Version bump type'
required: false
type: choice
default: patch
options: [patch, minor, major]
permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Check if version exists on npm
id: check
run: |
PKG_NAME=$(node -p "require('./package.json').name")
PKG_VER=$(node -p "require('./package.json').version")
echo "name=$PKG_NAME version=$PKG_VER"
set +e
npm view "${PKG_NAME}@${PKG_VER}" version 2>/dev/null
if [ $? -eq 0 ]; then
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
fi
- name: Bump version
id: bump
if: steps.check.outputs.exists == 'true' && github.actor != 'github-actions[bot]'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
BUMP="${{ inputs.bump || 'patch' }}"
npm version "$BUMP" -m "chore: bump to v%s [skip ci]"
git push && git push --tags
echo "bumped=true" >> "$GITHUB_OUTPUT"
- name: Rebuild after bump
if: steps.bump.outputs.bumped == 'true'
run: pnpm build
- name: Publish to npm
if: steps.check.outputs.exists == 'false' || steps.bump.outputs.bumped == 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm publish --access public --no-git-checks