We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/syndr/ara-records-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
name: Release
on:
push:
branches:
- main
paths:
- 'package.json'
workflow_dispatch:
jobs:
check-version:
runs-on: ubuntu-latest
outputs:
version_changed: ${{ steps.check.outputs.changed }}
version: ${{ steps.get_version.outputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 2
- name: Check if version changed
id: check
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "changed=true" >> $GITHUB_OUTPUT
else
CURRENT_VERSION=$(jq -r .version package.json)
git checkout HEAD^
PREVIOUS_VERSION=$(jq -r .version package.json)
git checkout -
if [ "$CURRENT_VERSION" != "$PREVIOUS_VERSION" ]; then
echo "Version changed from $PREVIOUS_VERSION to $CURRENT_VERSION"
echo "changed=true" >> $GITHUB_OUTPUT
else
echo "Version unchanged: $CURRENT_VERSION"
echo "changed=false" >> $GITHUB_OUTPUT
fi
fi
- name: Get version
id: get_version
run: |
VERSION=$(jq -r .version package.json)
echo "version=$VERSION" >> $GITHUB_OUTPUT
release:
needs: check-version
if: needs.check-version.outputs.version_changed == 'true'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Create Git Tag
run: |
VERSION="${{ needs.check-version.outputs.version }}"
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Check if tag already exists
if git ls-remote --tags origin | grep -q "refs/tags/v$VERSION$"; then
echo "ℹ️ Tag v$VERSION already exists, skipping tag creation"
else
echo "✓ Creating new tag v$VERSION"
git tag -a "v$VERSION" -m "Release v$VERSION"
git push origin "v$VERSION"
# Verify the tag exists on the remote after push
if git ls-remote --tags origin | grep -q "refs/tags/v$VERSION$"; then
echo "✓ Tag v$VERSION successfully pushed to remote"
else
echo "❌ Failed to push tag v$VERSION to remote. Aborting."
exit 1
fi
fi
- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="${{ needs.check-version.outputs.version }}"
# Check if release already exists
if gh release view "v$VERSION" >/dev/null 2>&1; then
echo "ℹ️ Release v$VERSION already exists, skipping release creation"
else
echo "✓ Creating new release v$VERSION"
gh release create "v$VERSION" \
--title "v$VERSION" \
--notes "Release v$VERSION
See [CHANGELOG](https://github.com/${{ github.repository }}/commits/v$VERSION) for details." \
--generate-notes
fi
publish:
needs: [check-version, release]
if: needs.check-version.outputs.version_changed == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Check NPM_TOKEN availability
id: check_token
run: |
if [ -z "${{ secrets.NPM_TOKEN }}" ]; then
echo "has_token=false" >> $GITHUB_OUTPUT
echo "⚠️ NPM_TOKEN secret is not configured"
echo "⚠️ Skipping npm publish step"
echo "⚠️ To enable automatic npm publishing, add NPM_TOKEN to repository secrets"
else
echo "has_token=true" >> $GITHUB_OUTPUT
echo "✓ NPM_TOKEN is configured, will publish to npm"
fi
- name: Setup Node.js
if: steps.check_token.outputs.has_token == 'true'
uses: actions/setup-node@v6
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- name: Check if version already published to npm
if: steps.check_token.outputs.has_token == 'true'
id: check_npm
run: |
VERSION="${{ needs.check-version.outputs.version }}"
PACKAGE_NAME="@ultroncore/ara-records-mcp"
# Check if this version exists on npm
if npm view "$PACKAGE_NAME@$VERSION" version >/dev/null 2>&1; then
echo "already_published=true" >> $GITHUB_OUTPUT
echo "ℹ️ Version $VERSION is already published to npm, skipping publish"
else
echo "already_published=false" >> $GITHUB_OUTPUT
echo "✓ Version $VERSION not yet published, will publish to npm"
fi
- name: Install dependencies
if: steps.check_token.outputs.has_token == 'true' && steps.check_npm.outputs.already_published == 'false'
run: npm ci
- name: Publish to npm
if: steps.check_token.outputs.has_token == 'true' && steps.check_npm.outputs.already_published == 'false'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Skip npm publish
if: steps.check_token.outputs.has_token == 'false'
run: |
echo "📦 GitHub release created successfully"
echo "⏭️ Skipping npm publish (NPM_TOKEN not configured)"
echo ""
echo "To enable automatic npm publishing:"
echo "1. Create an npm access token at https://www.npmjs.com/settings/tokens"
echo "2. Add it as NPM_TOKEN in repository Settings → Secrets and variables → Actions"