From 6cdebf226aa446c6e6f513952993328c80b45514 Mon Sep 17 00:00:00 2001 From: Felix Weinberger Date: Tue, 31 Mar 2026 14:52:28 +0000 Subject: [PATCH] chore(ci): remove dead publish job from main.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The publish job runs `pnpm publish` from the workspace root, which has `private: true` — structurally can't succeed since the monorepo conversion. It triggers on `on: release` which fires 5× when changesets creates one GitHub Release per package, producing 5 red X per release. release.yml is the real publish path. v1.x is unaffected: it has its own main.yml in its own tree, and on:release loads workflow YAML from the tagged commit, not the default branch. --- .github/workflows/main.yml | 52 -------------------------------------- 1 file changed, 52 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f19a11ebf..4b49b30c9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,8 +4,6 @@ on: - main pull_request: workflow_dispatch: - release: - types: [published] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -94,53 +92,3 @@ jobs: - name: Run ${{ matrix.runtime }} integration tests run: pnpm --filter @modelcontextprotocol/test-integration test:integration:${{ matrix.runtime }} - publish: - runs-on: ubuntu-latest - if: github.event_name == 'release' - environment: release - needs: [build, test, test-runtimes] - - permissions: - contents: read - id-token: write - - steps: - - uses: actions/checkout@v6 - - - name: Install pnpm - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 - id: pnpm-install - with: - run_install: false - - uses: actions/setup-node@v6 - with: - node-version: 24 - cache: pnpm - cache-dependency-path: pnpm-lock.yaml - registry-url: 'https://registry.npmjs.org' - - run: pnpm install - - - name: Determine npm tag - id: npm-tag - run: | - VERSION=$(node -p "require('./package.json').version") - # Check if this is a beta release - if [[ "$VERSION" == *"-beta"* ]]; then - echo "tag=--tag beta" >> $GITHUB_OUTPUT - # Check if this release is from a non-primary branch (patch/maintenance release) - elif [[ "${{ github.event.release.target_commitish }}" != "main" && "${{ github.event.release.target_commitish }}" != "v1.x" ]]; then - # Use "release-X.Y" as tag for old branch releases (e.g., "release-1.23" for 1.23.x) - # npm tags are mutable pointers to versions (like "latest" pointing to 1.24.3). - # Using "release-1.23" means users can `npm install @modelcontextprotocol/sdk@release-1.23` - # to get the latest patch on that minor version, and the tag updates if we - # release 1.23.2, 1.23.3, etc. - # Note: Can't use "v1.23" because npm rejects tags that look like semver ranges. - MAJOR_MINOR=$(echo "$VERSION" | cut -d. -f1,2) - echo "tag=--tag release-${MAJOR_MINOR}" >> $GITHUB_OUTPUT - else - echo "tag=" >> $GITHUB_OUTPUT - fi - - - run: pnpm publish --provenance --access public ${{ steps.npm-tag.outputs.tag }} - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}