Skip to main content
Glama
npm-publish.yml1.87 kB
# This workflow will run tests using node and then publish a package to npm when a release is published # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages name: Node.js Package on: release: types: [published] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 20 - run: npm ci - run: npm run build - run: npm test publish-npm: needs: build runs-on: ubuntu-latest permissions: contents: read steps: - name: Checkout Repo uses: actions/checkout@v4 - name: Set version from tag run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: Setup Node uses: actions/setup-node@v4 with: node-version: 20 registry-url: https://registry.npmjs.org/ - name: Install dependencies run: npm ci - name: Set package version run: | echo $(jq --arg v "${{ env.VERSION }}" '(.version) = $v' package.json) > package.json echo $(jq --arg v "${{ env.VERSION }}" '.version = $v | .packages[0].version = $v' server.json) > server.json - name: Update version in source file run: | sed -i "s/version: \"[0-9]*\.[0-9]*\.[0-9]*\"/version: \"${{ env.VERSION }}\"/" src/index.ts - name: Build run: npm run build - name: Publish to npm (stable) if: ${{ !github.event.release.prerelease }} run: npm publish --access public env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} - name: Publish to npm (pre-release) if: ${{ github.event.release.prerelease }} run: npm publish --access public --tag=beta env: NODE_AUTH_TOKEN: ${{secrets.npm_token}}

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/docfork/docfork-mcp'

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