chore: set up multi-branch automated release#3110
chore: set up multi-branch automated release#3110mweberxyz wants to merge 1 commit intonodejs:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3110 +/- ##
==========================================
+ Coverage 94.04% 94.06% +0.01%
==========================================
Files 89 89
Lines 24333 24327 -6
==========================================
- Hits 22885 22883 -2
+ Misses 1448 1444 -4 ☔ View full report in Codecov by Sentry. |
mcollina
left a comment
There was a problem hiding this comment.
These scripts are becoming incredibly complex. Can you add some tests for them with mocks?
| } | ||
|
|
||
| throw new Error(`Could not find latest release of ${VERSION_TAG_PREFIX}x`) | ||
| } |
There was a problem hiding this comment.
I don't think this will work when we cut v7. we should really use semver here instead of relying on filters.
|
Yeah, I am not necessarily happy with the implementation, but wanted to get something up as fast as possible, knowing there's a ticking time bomb where a 6.x release following a 5.x release will cause corrupted release notes. To give myself more time for a cleaner solution, I'll get a PR up with just a fix for that particular issue. |
Closes #3103
This relates to...
Rationale
An issue was identified in the automatic release logic, where the changelog generation did not take multiple live release branches and major versions into account.
In fixing, automated release of both 6.x from
mainand 5.x fromv5.xis implemented, but will require two changes: this PR tomain, and a corresponding change tov5.x.Changes
mainorv5.xand the release automation will runscripts/release.jsfile with two variables set in header of script:VERSION_TAG_PREFIXandBRANCH(implemented in this PR formain, and the corresponding forv5.x)getLatestReleaselogic inscripts/release.jspaginated and updated to only find the latest release for the given major versionlatestnpm tag is explicitly being set inmainreleasesDemo
Create PR as a sample change and merge, then run create release PR workflow, merge PR, and observe releases
Note: both sample changes target package.json, neither triggered a release
NPM versions after demo runs: https://www.npmjs.com/package/@mweberxyz/undici?activeTab=versions
GitHub releases after demo runs: https://github.com/mweberxyz/nodejs-undici/releases
Status