-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: set up multi-branch automated release #3110
base: main
Are you sure you want to change the base?
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
main
and 5.x fromv5.x
is implemented, but will require two changes: this PR tomain
, and a corresponding change tov5.x
.Changes
main
orv5.x
and the release automation will runscripts/release.js
file with two variables set in header of script:VERSION_TAG_PREFIX
andBRANCH
(implemented in this PR formain
, and the corresponding forv5.x
)getLatestRelease
logic inscripts/release.js
paginated and updated to only find the latest release for the given major versionlatest
npm tag is explicitly being set inmain
releasesDemo
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