core: copy publish exports to dist package json #360
Workflow file for this run
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 | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
bun-version: [latest] | |
node-version: [22] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: ${{ matrix.bun-version }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: bun install --frozen-lockfile | |
- name: Type check | |
run: bun run typecheck | |
- name: Lint | |
run: bun run lint | |
- name: Build | |
run: bun run build | |
# NOTE - This also runs the tests for the examples | |
- name: Test | |
run: bun test | |
publish-preview: | |
if: github.event_name == 'pull_request' | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Install dependencies | |
run: bun install --frozen-lockfile | |
- name: Build packages for publishing preview | |
run: bun run prepublishOnly | |
- name: Check changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v47 | |
with: | |
files_yaml: | | |
core: | |
- 'packages/core/**' | |
create: | |
- 'packages/create-mcp-lite/**' | |
- 'templates/**' | |
- name: Publish core preview package | |
if: steps.changed-files.outputs.core_any_changed == 'true' | |
run: | | |
bunx pkg-pr-new publish "./packages/core" | |
- name: Publish create-mcp-lite preview package | |
if: steps.changed-files.outputs.create_any_changed == 'true' | |
run: | | |
bunx pkg-pr-new publish --bin "./packages/create-mcp-lite" |