Skip to main content
Glama

documcp

by tosin2013
release.yml6.19 kB
name: Release on: push: tags: - "v*.*.*" workflow_dispatch: inputs: version_type: description: "Version bump type" required: true default: "patch" type: choice options: - patch - minor - major jobs: test: name: Pre-release Tests 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" - name: Install dependencies run: npm ci - name: Run full test suite run: npm test -- --coverage - name: Verify 80% coverage threshold run: | coverage=$(npm test -- --coverage --silent | grep "All files" | awk '{print $4}' | sed 's/%//') if (( $(echo "$coverage < 80" | bc -l) )); then echo "Coverage $coverage% is below 80% threshold" exit 1 fi echo "Coverage $coverage% meets requirement" - name: Performance benchmarks run: npm run test:performance - name: Build verification run: npm run build release: name: Create Release runs-on: ubuntu-latest needs: test permissions: contents: write packages: write steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: "20.x" cache: "npm" registry-url: "https://registry.npmjs.org" - name: Verify NPM Token run: | if [ -z "$NODE_AUTH_TOKEN" ]; then echo "Error: NODE_AUTH_TOKEN is not set" echo "Please configure NPM_TOKEN in repository secrets" exit 1 fi echo "NPM token is configured" - name: Install dependencies run: npm ci - name: Build project run: npm run build - name: Generate changelog and release id: release run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then printf "Manual release triggered with version type: %s\n" "${{ github.event.inputs.version_type }}" npm run "release:${{ github.event.inputs.version_type }}" # Get the new version and changelog NEW_VERSION=$(node -p "require('./package.json').version") printf "new_version=v%s\n" "$NEW_VERSION" >> "$GITHUB_OUTPUT" # Extract changelog for this version if [ -f "CHANGELOG.md" ]; then # Get changelog section for current version CHANGELOG_CONTENT=$(awk "/## \[$NEW_VERSION\]/{flag=1; next} /## \[/{flag=0} flag" CHANGELOG.md || printf "## Changes\n\nAutomated release %s\n" "$NEW_VERSION") { echo "changelog_content<<EOF" printf "%s\n" "$CHANGELOG_CONTENT" echo "EOF" } >> "$GITHUB_OUTPUT" else printf "changelog_content=Automated release v%s\n" "$NEW_VERSION" >> "$GITHUB_OUTPUT" fi # Push the changes git push --follow-tags origin main else echo "Tag-based release" tag="${GITHUB_REF#refs/tags/}" printf "new_version=%s\n" "$tag" >> "$GITHUB_OUTPUT" printf "changelog_content=Release %s\n" "$tag" >> "$GITHUB_OUTPUT" fi - name: Create GitHub Release uses: ncipollo/release-action@v1 with: token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ steps.release.outputs.new_version }} name: Release ${{ steps.release.outputs.new_version }} body: | ## DocuMCP Release ${{ steps.release.outputs.new_version }} ${{ steps.release.outputs.changelog_content }} ### Installation ```bash npm install -g documcp@${{ steps.release.outputs.new_version }} ``` ### System Requirements - Node.js 20.x or higher - npm 9.x or higher ### Quick Start ```bash # Install globally npm install -g documcp # Use with MCP client documcp analyze-repository --path ./my-project ``` draft: false prerelease: false skipIfReleaseExists: true makeLatest: true - name: Publish to npm if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' run: | echo "Publishing to npm..." npm whoami npm publish echo "Successfully published to npm!" env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} docs: name: Deploy Documentation runs-on: ubuntu-latest needs: [test, release] permissions: pages: write id-token: write steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: "20.x" cache: "npm" - name: Install dependencies run: npm ci - name: Generate API documentation run: npm run docs:generate - name: Remove problematic media directory run: rm -rf docs/api/media - name: Install Docusaurus dependencies run: cd docs && npm ci - name: Copy API documentation to build directory run: | mkdir -p docs/build/api cp -r docs/api/* docs/build/api/ - name: Build Docusaurus site run: cd docs && npm run build env: NODE_ENV: production - name: Setup Pages uses: actions/configure-pages@v4 - name: Upload to GitHub Pages uses: actions/upload-pages-artifact@v3 with: path: ./docs/build - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4

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/tosin2013/documcp'

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