Skip to content

build(dev-infra): add release automation script for zone.js#67136

Open
atscott wants to merge 2 commits intoangular:mainfrom
atscott:zonejsautomation
Open

build(dev-infra): add release automation script for zone.js#67136
atscott wants to merge 2 commits intoangular:mainfrom
atscott:zonejsautomation

Conversation

@atscott
Copy link
Contributor

@atscott atscott commented Feb 18, 2026

This PR introduces a release automation script for zone.js, converting the manual steps outlined in packages/zone.js/DEVELOPER.md into an interactive script located at packages/zone.js/tools/release.mts.

The script supports two workflows:

  1. Create a PR for release:
    • Automates version bumping, changelog generation, and branch creation.
    • Pushes the branch to your fork and provides a PR link.
  2. Cut a release:
    • Checks out the release commit from upstream.
    • Builds the package.
    • Publishes to npm.
    • Tags the release and pushes the tag upstream.

Usage:

cd packages/zone.js
pnpm release

@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: zones Issues related to zone.js labels Feb 18, 2026
@ngbot ngbot bot added this to the Backlog milestone Feb 18, 2026
@angular-robot angular-robot bot added the area: docs Related to the documentation label Feb 19, 2026
@pullapprove pullapprove bot requested a review from devversion February 19, 2026 00:02
@atscott atscott force-pushed the zonejsautomation branch 2 times, most recently from e358fe7 to 53e0220 Compare February 19, 2026 00:04
@angular-robot angular-robot bot added area: build & ci Related the build and CI infrastructure of the project area: dev-infra Issues related to Angular's own dev infra (build, test, CI, releasing) labels Feb 19, 2026
@atscott atscott force-pushed the zonejsautomation branch 2 times, most recently from 562e2f4 to 62b3ee4 Compare February 19, 2026 00:12
@atscott atscott requested review from alan-agius4 and removed request for devversion February 19, 2026 00:13
@atscott atscott force-pushed the zonejsautomation branch 4 times, most recently from a67e2f6 to f331814 Compare February 19, 2026 00:34
This commit introduces a new release automation script for zone.js, located at
packages/zone.js/tools/release.mts.

It also updates:
- packages/zone.js/package.json: Adds 'release' script.
- package.json: Adds 'zonejs:release' script for root access.
- packages/zone.js/DEVELOPER.md: Documents the new automated release process.
- tools/gulp-tasks/changelog-zonejs.js: Filters changelog to only include 'feat', 'fix', and 'perf' commits.
package.json Outdated
"benchmarks": "node scripts/benchmarks/index.mts",
"diff-release-package": "node scripts/diff-release-package.mts"
"diff-release-package": "node scripts/diff-release-package.mts",
"zonejs:release": "node packages/zone.js/tools/release.mts"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"zonejs:release": "node packages/zone.js/tools/release.mts"
"zonejs:release": "pnpm --filter=zone.js release"

return newVersion;
}

async function getPreviousTag(): Promise<string> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of the tag can't we just use the version in the package.json as the current version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current and next versions are determined from what's in package.json. This is only used as a "sanity check" in the console output as "the previous release was {previousTagVersion}"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's also required in the current script for the changelog generation

@atscott atscott force-pushed the zonejsautomation branch 2 times, most recently from 1224144 to 627fd77 Compare February 19, 2026 19:00
@atscott atscott changed the title feat(zone.js): add release automation script build(dev-infra): add release automation script for zone.js Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build & ci Related the build and CI infrastructure of the project area: dev-infra Issues related to Angular's own dev infra (build, test, CI, releasing) area: docs Related to the documentation area: zones Issues related to zone.js detected: feature PR contains a feature commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments