Skip to content

feat(ci): support stage and beta pre-releases in release action - #54

Open
vafreitas wants to merge 1 commit into
developfrom
feature/beta-releases-workflow
Open

vafreitas wants to merge 1 commit into
developfrom
feature/beta-releases-workflow

Conversation

@vafreitas

Copy link
Copy Markdown
Member

Summary

Adds end-to-end support for pre-release channels (beta / staging) to the release automation script and GitHub Actions workflow.

This enables validation of builds cut directly from develop across the full delivery chain (extension .eext, standalone .mcpb bundle, GitHub pre-release, and npm @beta dist-tag) before merging into master for production release.


Motivation

Previously, package releases were only triggered on push to master. Staging new features or testing MCP tool changes in live EasyEDA Pro and AI client environments required either local links or immediate production publishes.

This change introduces an industry-standard dual-channel lifecycle:

  • develop branch: Generates SemVer pre-releases (X.Y.Z-beta.N), publishes to npm under @beta, and flags releases on GitHub as Pre-release.
  • master branch: Automatically graduates pre-releases to official stable versions (X.Y.Z), publishes to npm under @latest, and pushes to the official Model Context Protocol Registry.

Key Changes

1. Version Automation Script (scripts/bump-version.mjs)

  • SemVer 2.0.0 Pre-release Parsing: Extended parseSemver and incSemver to parse, validate, and bump pre-release tags (1.5.0-beta.0, 1.5.0-beta.1).
  • Sequential Beta Tagging (getNextPrereleaseVersion): Queries existing Git tags to deterministically compute the next sequential beta number (-beta.0 ➔ -beta.1 ➔ -beta.2), preventing npm registry version collision.
  • Master Graduation: When merging develop into master with an active beta version, the script automatically strips the -beta.X suffix, graduates to the target stable SemVer, and aggregates commit history since the previous stable release into the changelog.
  • CLI Options: Added --channel <auto|stable|beta> argument and exported channel and is_prerelease flags to $GITHUB_OUTPUT.

2. Release Action Workflow (.github/workflows/release.yml)

  • Controlled Manual Dispatch: Pre-releases on develop are triggered on demand via workflow_dispatch to avoid flooding npm and GitHub with redundant intermediate builds.
  • Protected NPM Dist-Tags:
    • Beta channel: Published via npm publish --tag beta (keeping @latest clean for production users).
    • Stable channel: Published via npm publish --tag latest.
  • GitHub Pre-releases:
    • Invokes gh release create with --prerelease for beta builds.
    • Generates clear beta-specific install instructions in the release notes:
      npx -y @vlabsoftware/easyeda-pro-mcp@beta setup
  • MCP Registry Isolation: Constrains mcp-publisher execution to stable production releases only (is_prerelease != 'true').
  • Branch-Aware Pushes: Commits and tags are pushed to HEAD:${{ github.ref_name }}. Automatic back-sync to develop only executes on stable releases from master.

@vafreitas vafreitas self-assigned this Nov 3, 2026
@vafreitas vafreitas added the status: in review Code written; waiting for review or QA testing. label Nov 3, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: in review Code written; waiting for review or QA testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant