chore(deploy): migrating to multi-branch CI/CD release flow#9533
chore(deploy): migrating to multi-branch CI/CD release flow#9533mmaietta merged 7 commits intoelectron-userland:masterfrom
Conversation
|
There was a problem hiding this comment.
Pull request overview
Updates the repo’s release automation to support publishing from multiple branches with branch-based npm dist-tags, while also reorganizing TypeScript build configuration for scripts.
Changes:
- Extend the release GitHub Action to run on
masterandrelease/**, and determine the npm dist-tag from the branch name. - Switch CI publishing to
changeset publishwith a configurable dist-tag viaNPM_DIST_TAG. - Consolidate scripts TypeScript configuration under
scripts/tsconfig.jsonand adjust schema generation TS compiler options.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tsconfig.json |
Points the solution build at ./scripts instead of ./scripts/renderer. |
scripts/tsconfig.json |
New TS project config for compiling scripts/** TypeScript. |
scripts/renderer/tsconfig.json |
Removes the per-subfolder TS project config in favor of the new scripts config. |
scripts/generate-schema.ts |
Adjusts TS compiler option typing for schema generation. |
package.json |
Updates ci:publish to use changeset publish and a branch-provided dist-tag. |
.github/workflows/pr-release.yml |
Adds release-branch triggers, dist-tag derivation, and publish summary output. |
.changeset/config.release-v26.json |
Adds a changesets config intended for release/v26.x. |
.changeset/config.json |
Updates schema reference and modifies changesets config fields. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
… now and keep branch-level release cut in separate PR
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
🎯 Overview
This adds support for automated releases with a multi-branch/multi-dist-tag setup in the monorepo while still leveraging changesets/CLI and changesets/action GH app.
TLDR;
nexttag will always be "bleeding edge" - latest fixes, latest featureslatestwill always refer to stable - tends to track downloads % on https://www.npmjs.com/package/electron-builder?activeTab=versionsv26will become legacy/CommonJS releasemasternextconfig.jsonrelease/v1.xv1config.release-v1.jsonrelease/v2.xv2config.release-v2.jsonrelease/vN.xvNconfig.release-vN.jsonBranch Naming Convention: Release branches MUST follow the pattern
release/v{major}.x(e.g.,release/v1.x,release/v2.x)The
changesets/actionGitHub Action automatically:The only customization needed is:
baseBranchin changeset configs per branch--tagargument when publishing📝 Configuration Details
Master Branch Config (
.changeset/config.json){ "baseBranch": "master", .... }Release/v26 Branch Config (
.changeset/config.release-v26.json){ "baseBranch": "release/v26.x", .... }As an overview...when Changesets Exist
🔧 Adding a new Release Branch is SIMPLE
To support a new branch (e.g.,
release/v27.x):1. Add new release branch config
Create
.changeset/config.release-v27.json:{ "baseBranch": "release/v27.x", .... }2. That's it