chore: set up multi-branch automated release #3110
Draft
+57
−34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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