AgentQL MCP Server

name: Publish Package on: release: types: [created] workflow_dispatch: jobs: publish: runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v4 - name: Set up 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: Check if Version Was Bumped run: | published=$(npm view agentql-mcp version || echo "0.0.0") current=$(node -p "require('./package.json').version") echo "Published version: $published" echo "Current version: $current" if [ "$published" != "$current" ]; then echo "PUBLISH=yes" >> $GITHUB_ENV else echo "PUBLISH=no" >> $GITHUB_ENV echo "Version $current already exists on NPM" fi - name: Build if: ${{ env.PUBLISH == 'yes' }} run: npm run build - name: Publish to NPM if: ${{ env.PUBLISH == 'yes' }} run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_API_TOKEN }}