Skip to content

Commit 0be854b

Browse files
authored
ci: build and publish MCPB bundle for pdf-server (modelcontextprotocol#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
1 parent 3de035d commit 0be854b

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ jobs:
6666

6767
- run: npm run prettier
6868

69+
- name: Build MCPB bundle (pdf-server)
70+
if: runner.os == 'Linux' && matrix.name == 'Linux x64'
71+
run: npx -y @anthropic-ai/mcpb pack
72+
working-directory: examples/pdf-server
73+
6974
e2e:
7075
runs-on: ubuntu-latest
7176
steps:

.github/workflows/npm-publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,35 @@ jobs:
138138
run: npm publish --workspace examples/${{ matrix.example }} --provenance --access public
139139
env:
140140
NODE_AUTH_TOKEN: ${{ secrets.NPM_SECRET }}
141+
142+
publish-mcpb:
143+
runs-on: ubuntu-latest
144+
if: github.event_name == 'release'
145+
environment: Release
146+
needs: [publish-examples]
147+
148+
permissions:
149+
contents: write
150+
151+
steps:
152+
- uses: actions/checkout@v6
153+
- uses: oven-sh/setup-bun@v2
154+
with:
155+
bun-version: latest
156+
- uses: actions/setup-node@v6
157+
with:
158+
node-version: "22"
159+
cache: npm
160+
- run: npm ci
161+
162+
- name: Build pdf-server
163+
run: npm run build --workspace examples/pdf-server
164+
165+
- name: Pack MCPB bundle
166+
run: npx -y @anthropic-ai/mcpb pack
167+
working-directory: examples/pdf-server
168+
169+
- name: Upload MCPB to release
170+
run: gh release upload "${{ github.event.release.tag_name }}" examples/pdf-server/*.mcpb --clobber
171+
env:
172+
GH_TOKEN: ${{ github.token }}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ intermediate-findings/
1212
playwright-report/
1313
test-results/
1414
__pycache__/
15-
*.pyc
15+
*.pyc
16+
17+
# MCPB bundles (built artifacts)
18+
*.mcpb

0 commit comments

Comments
 (0)