9191 # Check if this is a beta release
9292 if [[ "$VERSION" == *"-beta"* ]]; then
9393 echo "tag=--tag beta" >> $GITHUB_OUTPUT
94- # Check if this release is from a non-main branch (patch/maintenance release)
95- elif [[ "${{ github.event.release.target_commitish }}" != "main" ]]; then
94+ # Check if this release is from a non-primary branch (patch/maintenance release)
95+ elif [[ "${{ github.event.release.target_commitish }}" != "main" && "${{ github.event.release.target_commitish }}" != "v1.x" ]]; then
9696 # Use "release-X.Y" as tag for old branch releases (e.g., "release-1.23" for 1.23.x)
9797 # npm tags are mutable pointers to versions (like "latest" pointing to 1.24.3).
9898 # Using "release-1.23" means users can `npm install @modelcontextprotocol/sdk@release-1.23`
@@ -108,42 +108,3 @@ jobs:
108108 - run : pnpm publish --provenance --access public ${{ steps.npm-tag.outputs.tag }}
109109 env :
110110 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
111-
112- # Generates API documentation for GitHub Pages on any release
113- # Supports both simple tags (v1.2.3) and package-scoped tags (@scope/package@1.2.3)
114- publish-gh-pages :
115- runs-on : ubuntu-latest
116- if : github.event_name == 'release'
117- needs : [publish]
118-
119- permissions :
120- contents : write
121-
122- steps :
123- - uses : actions/checkout@v4
124- with :
125- fetch-depth : 0 # Fetch all history for all branches and tags
126-
127- - name : Install pnpm
128- uses : pnpm/action-setup@v4
129- with :
130- run_install : false
131- - uses : actions/setup-node@v4
132- with :
133- node-version : 24
134- cache : pnpm
135- cache-dependency-path : pnpm-lock.yaml
136-
137- - name : Install dependencies
138- run : pnpm install
139-
140- - name : Configure Git
141- run : |
142- git config --global user.name "github-actions[bot]"
143- git config --global user.email "github-actions[bot]@users.noreply.github.com"
144-
145- - name : Generate documentation
146- run : ./scripts/generate-gh-pages.sh "${{ github.ref_name }}"
147-
148- - name : Push to gh-pages
149- run : git push origin gh-pages
0 commit comments