Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .changeset/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/config.json

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/tender-snails-fold.md

This file was deleted.

55 changes: 17 additions & 38 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
branches:
- main
- v1.x
pull_request:
workflow_dispatch:
release:
Expand All @@ -16,47 +16,32 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
run_install: false
- uses: actions/setup-node@v6
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
cache: npm

- run: pnpm install
- run: pnpm run check:all
- run: pnpm run build:all
- run: npm ci
- run: npm run check
- run: npm run build

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [20, 22, 24]
node-version: [18, 24]

steps:
- uses: actions/checkout@v6

- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
run_install: false
- uses: actions/setup-node@v6
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- run: pnpm install
cache: npm

- run: pnpm test:all
- run: npm ci
- run: npm test

publish:
runs-on: ubuntu-latest
Expand All @@ -70,19 +55,13 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
run_install: false
- uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
cache: npm
registry-url: 'https://registry.npmjs.org'
- run: pnpm install

- run: npm ci

- name: Determine npm tag
id: npm-tag
Expand All @@ -105,6 +84,6 @@ jobs:
echo "tag=" >> $GITHUB_OUTPUT
fi

- run: pnpm publish --provenance --access public ${{ steps.npm-tag.outputs.tag }}
- run: npm publish --provenance --access public ${{ steps.npm-tag.outputs.tag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
30 changes: 8 additions & 22 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Publish Any Commit

permissions:
contents: read

on:
pull_request:
push:
Expand All @@ -16,26 +14,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false

- name: Setup Node.js
uses: actions/setup-node@v6
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: pnpm install

- name: Build packages
run: pnpm run build:all
cache: npm

- name: Publish preview packages
run: pnpm dlx pkg-pr-new publish --packageManager=npm --pnpm './packages/server' './packages/client'
- run: npm ci
- name: Build
run: npm run build
- name: Publish
run: npx pkg-pr-new publish
45 changes: 0 additions & 45 deletions .github/workflows/release.yml

This file was deleted.

26 changes: 9 additions & 17 deletions .github/workflows/update-spec-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
run_install: false
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
node-version: '24'

- name: Install dependencies
run: pnpm install
run: npm ci

- name: Fetch latest spec types
run: pnpm run fetch:spec-types
run: npm run fetch:spec-types

- name: Check for changes
id: check_changes
run: |
if git diff --quiet packages/core/src/types/spec.types.ts; then
if git diff --quiet src/spec.types.ts; then
echo "has_changes=false" >> $GITHUB_OUTPUT
else
echo "has_changes=true" >> $GITHUB_OUTPUT
LATEST_SHA=$(grep "Last updated from commit:" packages/core/src/types/spec.types.ts | cut -d: -f2 | tr -d ' ')
LATEST_SHA=$(grep "Last updated from commit:" src/spec.types.ts | cut -d: -f2 | tr -d ' ')
echo "sha=$LATEST_SHA" >> $GITHUB_OUTPUT
fi

Expand All @@ -56,12 +48,12 @@ jobs:
git config user.email "github-actions[bot]@users.noreply.github.com"

git checkout -B update-spec-types
git add packages/core/src/types/spec.types.ts
git add src/spec.types.ts
git commit -m "chore: update spec.types.ts from upstream"
git push -f origin update-spec-types

# Create PR if it doesn't exist, or update if it does
PR_BODY="This PR updates \`packages/core/src/types/spec.types.ts\` from the Model Context Protocol specification.
PR_BODY="This PR updates \`src/spec.types.ts\` from the Model Context Protocol specification.

Source file: https://github.com/modelcontextprotocol/modelcontextprotocol/blob/${{ steps.check_changes.outputs.sha }}/schema/draft/schema.ts

Expand Down
Loading
Loading