From fd907524d0d499538ffb1d4554226e6046231b84 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Mon, 11 Nov 2024 15:06:05 +0000 Subject: [PATCH 1/2] Bump version for initial publishing --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7f13bff3d..a84d1ff0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/sdk", - "version": "0.3.3", + "version": "0.4.0", "description": "Model Context Protocol implementation for TypeScript", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", From acb96d996d24f7006014ee0becb092cc46c35523 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Mon, 11 Nov 2024 15:43:12 +0000 Subject: [PATCH 2/2] Publish releases publicly to npm --- .github/workflows/main.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3335e5c38..d62beee84 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,7 +4,7 @@ on: - main pull_request: release: - types: [created] + types: [published] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -26,13 +26,14 @@ jobs: - run: npm test - run: npm run lint - package: + publish: runs-on: ubuntu-latest if: github.event_name == 'release' needs: build permissions: - contents: write + contents: read + id-token: write steps: - uses: actions/checkout@v4 @@ -40,12 +41,9 @@ jobs: with: node-version: 18 cache: npm + registry-url: 'https://registry.npmjs.org' - run: npm ci - - run: npm pack - - - name: Upload package to release + - run: npm publish --provenance --access public env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh release upload ${{ github.event.release.tag_name }} ./*.tgz + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}