ci: build and publish MCPB bundle for pdf-server (#495)

- Add *.mcpb to .gitignore (built artifacts)
- Validate MCPB pack in CI (Linux x64 only)
- Build and upload .mcpb as GitHub release asset on publish
This commit is contained in:
Olivier Chafik 2026-02-24 01:48:17 +00:00 • committed by GitHub
commit 0be854b244
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 41 additions and 1 deletions

View file

@ -66,6 +66,11 @@ jobs:
- run: npm run prettier
- name: Build MCPB bundle (pdf-server)
if: runner.os == 'Linux' && matrix.name == 'Linux x64'
run: npx -y @anthropic-ai/mcpb pack
working-directory: examples/pdf-server
e2e:
runs-on: ubuntu-latest
steps:

View file

@ -138,3 +138,35 @@ jobs:
run: npm publish --workspace examples/${{ matrix.example }} --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_SECRET }}
publish-mcpb:
runs-on: ubuntu-latest
if: github.event_name == 'release'
environment: Release
needs: [publish-examples]
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: npm
- run: npm ci
- name: Build pdf-server
run: npm run build --workspace examples/pdf-server
- name: Pack MCPB bundle
run: npx -y @anthropic-ai/mcpb pack
working-directory: examples/pdf-server
- name: Upload MCPB to release
run: gh release upload "${{ github.event.release.tag_name }}" examples/pdf-server/*.mcpb --clobber
env:
GH_TOKEN: ${{ github.token }}

5
.gitignore vendored
View file

@ -12,4 +12,7 @@ intermediate-findings/
playwright-report/
test-results/
__pycache__/
*.pyc
*.pyc
# MCPB bundles (built artifacts)
*.mcpb