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

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 }}