Skip to main content
Glama
release.yml2.72 kB
name: Release on: push: tags: - "v*" jobs: validate-and-publish: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: "20.x" cache: "npm" registry-url: "https://registry.npmjs.org" - name: Install dependencies run: npm ci - name: Validate tag format run: | TAG=${GITHUB_REF#refs/tags/} if [[ ! $TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.-]+)?$ ]]; then echo "Invalid tag format: $TAG" echo "Expected format: v1.2.3 or v1.2.3-alpha.1" exit 1 fi echo "Tag format valid: $TAG" - name: Validate version consistency run: | TAG=${GITHUB_REF#refs/tags/} PACKAGE_VERSION="v$(node -p "require('./package.json').version")" if [ "$TAG" != "$PACKAGE_VERSION" ]; then echo "Tag $TAG does not match package.json version $PACKAGE_VERSION" exit 1 fi echo "Version consistency validated" - name: Run full validation suite run: npm run validate:ci - name: Security audit run: npm audit --audit-level=high - name: Check for sensitive files run: | if [ -f ".env" ] || [ -f "*.key" ] || [ -f "*.pem" ]; then echo "Sensitive files detected in repository" exit 1 fi echo "No sensitive files detected" - name: Validate README and documentation run: | if [ ! -f "README.md" ]; then echo "README.md is required" exit 1 fi if [ ! -s "README.md" ]; then echo "README.md cannot be empty" exit 1 fi echo "Documentation validation passed" - name: Create GitHub Release uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: name: Release ${{ github.ref_name }} draft: false prerelease: ${{ contains(github.ref, '-') }} - name: Publish to NPM run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Notify on success if: success() run: | echo "🎉 Successfully published $(node -p "require('./package.json').name")@$(node -p "require('./package.json').version")" - name: Notify on failure if: failure() run: | echo "❌ Publication failed for $(node -p "require('./package.json').name")@$(node -p "require('./package.json').version")"

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/keyurgolani/ThoughtMcp'

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