chore: prepare v1.9.0 release #209
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI/CD Pipeline | |
| on: | |
| push: | |
| branches: [ main ] # Only main triggers CI/CD | |
| tags: [ 'v*' ] # Tags trigger Docker builds | |
| pull_request: | |
| branches: [ main ] # PRs to main get tested | |
| workflow_dispatch: # Allow manual triggering | |
| permissions: | |
| contents: write | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install Aikido Safe Chain | |
| run: | | |
| curl -fsSL "https://github.com/AikidoSec/safe-chain/releases/download/1.5.7/install-safe-chain.sh" | sh -s -- --ci | |
| echo "$HOME/.safe-chain/shims" >> "$GITHUB_PATH" | |
| echo "$HOME/.safe-chain/bin" >> "$GITHUB_PATH" | |
| - name: Verify Aikido Safe Chain | |
| run: npm safe-chain-verify | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Type check | |
| run: npm run type-check | |
| - name: Lint | |
| run: npm run lint | |
| - name: Build | |
| run: npm run build | |
| - name: Build MCPB extension | |
| run: npm run mcpb:build | |
| - name: Run tests | |
| env: | |
| HELPSCOUT_APP_ID: ${{ secrets.HELPSCOUT_APP_ID }} | |
| HELPSCOUT_APP_SECRET: ${{ secrets.HELPSCOUT_APP_SECRET }} | |
| HELPSCOUT_CLIENT_ID: ${{ secrets.HELPSCOUT_APP_ID }} | |
| HELPSCOUT_CLIENT_SECRET: ${{ secrets.HELPSCOUT_APP_SECRET }} | |
| run: npm test -- --runInBand | |
| - name: Run full dogfood | |
| if: matrix.node-version == '20.x' | |
| env: | |
| HELPSCOUT_APP_ID: ${{ secrets.HELPSCOUT_APP_ID }} | |
| HELPSCOUT_APP_SECRET: ${{ secrets.HELPSCOUT_APP_SECRET }} | |
| HELPSCOUT_CLIENT_ID: ${{ secrets.HELPSCOUT_APP_ID }} | |
| HELPSCOUT_CLIENT_SECRET: ${{ secrets.HELPSCOUT_APP_SECRET }} | |
| HELPSCOUT_DEFAULT_INBOX_ID: '359402' | |
| run: npm run dogfood:full | |
| - name: Run authenticated edge-case test | |
| if: matrix.node-version == '20.x' | |
| env: | |
| HELPSCOUT_APP_ID: ${{ secrets.HELPSCOUT_APP_ID }} | |
| HELPSCOUT_APP_SECRET: ${{ secrets.HELPSCOUT_APP_SECRET }} | |
| HELPSCOUT_CLIENT_ID: ${{ secrets.HELPSCOUT_APP_ID }} | |
| HELPSCOUT_CLIENT_SECRET: ${{ secrets.HELPSCOUT_APP_SECRET }} | |
| HELPSCOUT_DEFAULT_INBOX_ID: '359402' | |
| run: npm run test:forensic | |
| - name: Docker smoke test | |
| run: npm run test:docker:ci | |
| docker: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Verify tag is on main branch | |
| env: | |
| COMMIT_SHA: ${{ github.sha }} | |
| run: | | |
| git fetch origin main | |
| if ! git merge-base --is-ancestor "$COMMIT_SHA" origin/main; then | |
| echo "::error::Docker builds only allowed from tags on main branch. Push tag after merging to main." | |
| exit 1 | |
| fi | |
| echo "✅ Tag verified on main branch" | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Extract package version | |
| id: package | |
| run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | |
| - name: Extract metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ secrets.DOCKERHUB_USERNAME }}/help-scout-mcp-server | |
| tags: | | |
| type=raw,value=latest | |
| type=raw,value=v${{ steps.package.outputs.version }} | |
| type=raw,value=${{ steps.package.outputs.version }} | |
| labels: | | |
| org.opencontainers.image.title=Help Scout MCP Server | |
| org.opencontainers.image.description=Model Context Protocol server for Help Scout - enables AI assistants to search conversations, customers, and support data | |
| org.opencontainers.image.version=${{ steps.package.outputs.version }} | |
| org.opencontainers.image.vendor=Drew Burchfield | |
| org.opencontainers.image.licenses=MIT | |
| org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} | |
| org.opencontainers.image.documentation=${{ github.server_url }}/${{ github.repository }}#readme | |
| org.opencontainers.image.url=${{ github.server_url }}/${{ github.repository }} | |
| io.github.tags=mcp,model-context-protocol,modelcontextprotocol,mcp-server,help-scout,help-scout-api,helpscout,customer-support,typescript,nodejs | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| platforms: linux/amd64,linux/arm64 | |
| - name: Update Docker Hub description | |
| uses: peter-evans/dockerhub-description@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| repository: ${{ secrets.DOCKERHUB_USERNAME }}/help-scout-mcp-server | |
| short-description: "MCP server for Help Scout - enables AI assistants to search conversations and support data" | |
| readme-filepath: ./README.md | |
| update-docker-readme: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Update Docker Hub description only | |
| uses: peter-evans/dockerhub-description@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| repository: ${{ secrets.DOCKERHUB_USERNAME }}/help-scout-mcp-server | |
| short-description: "MCP server for Help Scout - enables AI assistants to search conversations and support data" | |
| readme-filepath: ./README.md | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: [test] | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install Aikido Safe Chain | |
| run: | | |
| curl -fsSL "https://github.com/AikidoSec/safe-chain/releases/download/1.5.7/install-safe-chain.sh" | sh -s -- --ci | |
| echo "$HOME/.safe-chain/shims" >> "$GITHUB_PATH" | |
| echo "$HOME/.safe-chain/bin" >> "$GITHUB_PATH" | |
| - name: Verify Aikido Safe Chain | |
| run: npm safe-chain-verify | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| # Uncomment when ready to publish to npm | |
| # - name: Publish to npm | |
| # run: npm publish | |
| # env: | |
| # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |