Skip to content

Commit 6f8e306

Browse files
committed
build: add npm run bump; parallel npm-publish approval
- scripts/bump-version.mjs (+ npm run bump): bumps root and all workspace package versions, updates examples' ^X.Y.0 dependency range on the root package (matters on major bumps), and refreshes package-lock so npm ci accepts the release PR. - npm-publish.yml: all publish jobs now depend directly on [build, test] instead of chaining, so they enter "waiting for approval" together and a single Review-deployments click approves the lot. Prerelease versions (any X.Y.Z-…) publish under --tag beta so they don't take latest. - CONTRIBUTING.md: release steps now use npm run bump. Dropped from the original change: the workflow_dispatch release.yml (required a long-lived PAT to cascade events), label-based .github/release.yml auto-notes (PRs aren't labeled today), and the release-X.Y npm-tag for non-main branches (no backport branches yet).
1 parent f611aad commit 6f8e306

4 files changed

Lines changed: 9 additions & 155 deletions

File tree

.github/release.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/npm-publish.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,8 @@ jobs:
142142
id: npm-tag
143143
run: |
144144
VERSION=$(node -p "require('./package.json').version")
145-
if [[ "$VERSION" == *"-beta"* ]]; then
145+
if [[ "$VERSION" == *"-"* ]]; then
146146
echo "tag=--tag beta" >> $GITHUB_OUTPUT
147-
elif [[ "${{ github.event.release.target_commitish }}" != "main" ]]; then
148-
MAJOR_MINOR=$(echo "$VERSION" | cut -d. -f1,2)
149-
echo "tag=--tag release-${MAJOR_MINOR}" >> $GITHUB_OUTPUT
150147
else
151148
echo "tag=" >> $GITHUB_OUTPUT
152149
fi
@@ -159,6 +156,7 @@ jobs:
159156
publish-mcpb:
160157
runs-on: ubuntu-latest
161158
if: github.event_name == 'release'
159+
environment: Release
162160
needs: [build, test]
163161

164162
permissions:

.github/workflows/release.yml

Lines changed: 0 additions & 93 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -537,39 +537,19 @@ Before publishing releases, ensure the following are configured:
537537
- Name it `Release`
538538
- Add required reviewers or other protection rules as needed
539539

540-
3. **`RELEASE_TOKEN` secret**: The release workflow creates GitHub Releases that must trigger the npm-publish workflow. Events from the default `GITHUB_TOKEN` don't cascade to other workflows, so a separate token is needed.
541-
- Create a [fine-grained PAT](https://github.com/settings/personal-access-tokens/new) scoped to this repository with **Contents: write** permission
542-
- Go to Settings > Secrets and variables > Actions > New repository secret
543-
- Name: `RELEASE_TOKEN`, value: the PAT
544-
545540
### Publishing a Release
546541

547-
Releases are automated via the [Release workflow](https://github.com/modelcontextprotocol/ext-apps/actions/workflows/release.yml).
548-
549-
#### Steps to publish:
550-
551-
1. **Trigger the Release workflow**:
552-
- Go to Actions → [Release](https://github.com/modelcontextprotocol/ext-apps/actions/workflows/release.yml) → "Run workflow"
553-
- Select the bump type (`patch`, `minor`, `major`, or `prerelease`)
554-
- Click "Run workflow"
555-
556-
2. **Review the release PR**:
557-
- The workflow bumps the version across all packages and opens a PR labeled `release`
558-
- Add release notes to `RELEASES.md` in the PR
559-
- Approve and merge the PR
560-
- _Note: re-running the workflow for the same version fails if the branch already exists. Delete the `release/vX.Y.Z` branch first if you need to redo the bump._
542+
1. **Bump the version** across the root and all workspace packages:
561543

562-
3. **Done** — merging the PR automatically tags the commit and creates the GitHub Release (with auto-generated notes), which triggers the [npm-publish workflow](https://github.com/modelcontextprotocol/ext-apps/actions/workflows/npm-publish.yml). Approve the deployment once when prompted.
544+
```bash
545+
npm run bump -- minor # or: patch | major | prerelease --preid=beta | 1.7.0
546+
```
563547

564-
#### Manual alternative
548+
Commit and open a PR with a grouped changelog in the body (see prior `chore: bump …` PRs for the format).
565549

566-
You can also bump versions locally:
567-
568-
```bash
569-
npm run bump -- patch # or: minor | major | prerelease --preid=beta
570-
```
550+
2. **Merge the PR**, then [draft a GitHub Release](https://github.com/modelcontextprotocol/ext-apps/releases/new) — create a `vX.Y.Z` tag on `main`, paste the changelog, publish.
571551

572-
Then commit, push, and create a GitHub Release manually — the npm-publish workflow triggers on release creation.
552+
3. **Approve the deployment** — publishing the Release triggers the [npm-publish workflow](https://github.com/modelcontextprotocol/ext-apps/actions/workflows/npm-publish.yml); all publish jobs wait together for a single "Review deployments" approval.
573553

574554
#### npm Tags
575555

0 commit comments

Comments
 (0)