Skip to content

Automate release workflow with version bumping and tagging#568

Open
ochafik wants to merge 7 commits intomainfrom
claude/automate-release-process-g5gka
Open

Automate release workflow with version bumping and tagging#568
ochafik wants to merge 7 commits intomainfrom
claude/automate-release-process-g5gka

Conversation

@ochafik
Copy link
Copy Markdown
Contributor

@ochafik ochafik commented Mar 26, 2026

Summary

This PR introduces a fully automated release workflow that streamlines the process of publishing new versions. Instead of manual version bumping and GitHub Release creation, contributors can now trigger releases through a GitHub Actions workflow that handles versioning, PR creation, tagging, and release notes generation.

Key Changes

  • New Release Workflow (.github/workflows/release.yml):

    • prepare job: Triggered manually via workflow dispatch, bumps versions across all packages and opens a release PR
    • tag job: Automatically runs when a release PR is merged, creates git tag and GitHub Release with auto-generated notes
    • Supports patch, minor, major, prerelease (with custom preid), or explicit version bumps
  • Version Bumping Script (scripts/bump-version.mjs):

    • Centralizes version bumping logic for root and workspace packages
    • Outputs new version to stdout for workflow consumption
    • Supports all semver bump types and explicit versions
  • Release Configuration (.github/release.yml):

    • Configures auto-generated release notes with categorized changelog
    • Excludes bot commits and release-related PRs from changelog
    • Organizes changes by type: Breaking Changes, Features, Examples, Bug Fixes, Documentation
  • Updated npm-publish Workflow (.github/workflows/npm-publish.yml):

    • Removed sequential job dependencies to allow parallel approval
    • All publish jobs now depend directly on [build, test] instead of chaining
    • Enables single "Review deployments" approval for all packages
  • Updated Documentation (CONTRIBUTING.md):

    • Simplified release instructions to use the new automated workflow
    • Added workflow dispatch link and step-by-step guide
    • Documented manual alternative for local version bumping
  • Added npm script (package.json):

    • New bump script for local version management

Implementation Details

The workflow uses a two-step process:

  1. Manual trigger → automated PR with version bumps and release notes placeholder
  2. PR merge → automatic tagging and GitHub Release creation → npm-publish workflow triggered

This design allows for review and documentation updates before the actual release, while keeping the tagging and publishing fully automated.

https://preview.claude.ai/code/session_015F1p4DHFUBeVYhNM2D8Roh

claude added 2 commits March 26, 2026 10:04
…R flow

Adds a Release workflow that bumps all package versions, generates release
notes, and opens a PR. Merging the PR auto-tags and creates the GitHub
Release, which triggers npm-publish. Also adds `npm run bump` for local use
and a release.yml config for categorized auto-generated notes.
- Drop auto-generated RELEASES.md prepending (notes are written manually in PR)
- Flatten npm-publish job dependencies so all publish jobs wait for approval
  together instead of sequentially, reducing 3 approval clicks to 1
- Remove Release environment from publish-mcpb (only needs GH_TOKEN)
- Use --generate-notes for GitHub Release creation
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 26, 2026

Open in StackBlitz

@modelcontextprotocol/ext-apps

npm i https://pkg.pr.new/@modelcontextprotocol/ext-apps@568

@modelcontextprotocol/server-basic-preact

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-preact@568

@modelcontextprotocol/server-basic-react

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-react@568

@modelcontextprotocol/server-basic-solid

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-solid@568

@modelcontextprotocol/server-basic-svelte

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-svelte@568

@modelcontextprotocol/server-basic-vanillajs

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-vanillajs@568

@modelcontextprotocol/server-basic-vue

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-vue@568

@modelcontextprotocol/server-budget-allocator

npm i https://pkg.pr.new/@modelcontextprotocol/server-budget-allocator@568

@modelcontextprotocol/server-cohort-heatmap

npm i https://pkg.pr.new/@modelcontextprotocol/server-cohort-heatmap@568

@modelcontextprotocol/server-customer-segmentation

npm i https://pkg.pr.new/@modelcontextprotocol/server-customer-segmentation@568

@modelcontextprotocol/server-debug

npm i https://pkg.pr.new/@modelcontextprotocol/server-debug@568

@modelcontextprotocol/server-map

npm i https://pkg.pr.new/@modelcontextprotocol/server-map@568

@modelcontextprotocol/server-pdf

npm i https://pkg.pr.new/@modelcontextprotocol/server-pdf@568

@modelcontextprotocol/server-scenario-modeler

npm i https://pkg.pr.new/@modelcontextprotocol/server-scenario-modeler@568

@modelcontextprotocol/server-shadertoy

npm i https://pkg.pr.new/@modelcontextprotocol/server-shadertoy@568

@modelcontextprotocol/server-sheet-music

npm i https://pkg.pr.new/@modelcontextprotocol/server-sheet-music@568

@modelcontextprotocol/server-system-monitor

npm i https://pkg.pr.new/@modelcontextprotocol/server-system-monitor@568

@modelcontextprotocol/server-threejs

npm i https://pkg.pr.new/@modelcontextprotocol/server-threejs@568

@modelcontextprotocol/server-transcript

npm i https://pkg.pr.new/@modelcontextprotocol/server-transcript@568

@modelcontextprotocol/server-video-resource

npm i https://pkg.pr.new/@modelcontextprotocol/server-video-resource@568

@modelcontextprotocol/server-wiki-explorer

npm i https://pkg.pr.new/@modelcontextprotocol/server-wiki-explorer@568

commit: 9befd1d

ochafik and others added 5 commits March 26, 2026 10:37
- release.yml: use RELEASE_TOKEN PAT for gh release create so the
  release:published event triggers npm-publish (GITHUB_TOKEN events
  don't cascade to other workflows)
- release.yml: checkout merge_commit_sha in tag job instead of ref:main
  to avoid tagging later commits
- release.yml: checkout ref:main in prepare job so dispatching from a
  feature branch doesn't pollute the release PR
- release.yml: constrain preid to type:choice[beta] to match
  npm-publish.yml's tag detection
- release.yml: drop -f on push so re-runs fail loudly instead of
  clobbering manual RELEASES.md edits; drop pr-edit fallback
- release.yml: ensure release label exists before gh pr create
- release.yml: make tag push idempotent for re-runs after partial
  failure
- bump-version.mjs: update workspace dependency ranges so major bumps
  don't leave examples pointing at the old major
- bump-version.mjs: run npm install --package-lock-only so npm ci
  on the release PR doesn't fail on lockfile mismatch
- npm-publish.yml: add npm-tag detection to publish-examples so beta
  example releases don't overwrite latest
- .github/release.yml: use [bot] suffix in author excludes so
  dependabot PRs are actually filtered from release notes
- CONTRIBUTING.md: document RELEASE_TOKEN setup; fix npm run -- syntax
…delcontextprotocol/ext-apps into claude/automate-release-process-g5gka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants