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:
parent
3de035dc8d
commit
0be854b244
3 changed files with 41 additions and 1 deletions
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
|
|
@ -66,6 +66,11 @@ jobs:
|
||||||
|
|
||||||
- run: npm run prettier
|
- 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:
|
e2e:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
|
||||||
32
.github/workflows/npm-publish.yml
vendored
32
.github/workflows/npm-publish.yml
vendored
|
|
@ -138,3 +138,35 @@ jobs:
|
||||||
run: npm publish --workspace examples/${{ matrix.example }} --provenance --access public
|
run: npm publish --workspace examples/${{ matrix.example }} --provenance --access public
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_SECRET }}
|
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
5
.gitignore
vendored
|
|
@ -12,4 +12,7 @@ intermediate-findings/
|
||||||
playwright-report/
|
playwright-report/
|
||||||
test-results/
|
test-results/
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|
||||||
|
# MCPB bundles (built artifacts)
|
||||||
|
*.mcpb
|
||||||
Loading…
Reference in a new issue