@@ -422,6 +422,11 @@ already defined in `src/node_version.h`:
422422#define NODE_MAJOR_VERSION x
423423#define NODE_MINOR_VERSION y
424424#define NODE_PATCH_VERSION z
425+
426+ // And for alpha releases:
427+ #define NODE_ALPHA_MAJOR_VERSION a
428+ #define NODE_ALPHA_MINOR_VERSION b
429+ #define NODE_ALPHA_PATCH_VERSION c
425430```
426431
427432Set the `NODE_VERSION_IS_RELEASE` macro value to `1`. This causes the build to
@@ -431,6 +436,14 @@ be produced with a version string that does not have a trailing pre-release tag:
431436#define NODE_VERSION_IS_RELEASE 1
432437```
433438
439+ <details>
440+ <summary>Major version release</summary>
441+
442+ Remove the `NODE_ALPHA_MAJOR_VERSION `, `NODE_ALPHA_MINOR_VERSION `, and
443+ `NODE_ALPHA_PATCH_VERSION ` macros.
444+
445+ </details>
446+
434447### 4 . Update the changelog
435448
436449_ (This step will be done automatically if you are using ` create-release-proposal ` or ` git node release --prepare ` )_
@@ -900,8 +913,8 @@ project README.
900913
901914On release proposal branch, edit ` src/node_version.h ` again and:
902915
903- * Increment ` NODE_PATCH_VERSION ` by one
904- * Change ` NODE_VERSION_IS_RELEASE ` back to ` 0 `
916+ * Increment ` NODE_PATCH_VERSION ` (or ` NODE_ALPHA_PATCH_VERSION ` for alpha releases) by one.
917+ * Change ` NODE_VERSION_IS_RELEASE ` back to ` 0 ` .
905918
906919Commit this change with the following commit message format:
907920
@@ -968,9 +981,12 @@ git restore --source=upstream/main src/node_version.h
968981On the main branch, instead of reverting changes made to ` src/node_version.h `
969982edit it instead and:
970983
971- * Increment ` NODE_MAJOR_VERSION ` by one
972- * Reset ` NODE_PATCH_VERSION ` to ` 0 `
973- * Change ` NODE_VERSION_IS_RELEASE ` back to ` 0 `
984+ * Increment ` NODE_MAJOR_VERSION ` by one.
985+ * Reset ` NODE_PATCH_VERSION ` and ` NODE_MINOR_VERSION ` to ` 0 ` .
986+ * Set ` NODE_ALPHA_MAJOR_VERSION ` , ` NODE_ALPHA_MINOR_VERSION ` , and
987+ ` NODE_ALPHA_PATCH_VERSION ` back to ` 0 ` (` main ` should already have this, the
988+ release commit will have them removed).
989+ * Change ` NODE_VERSION_IS_RELEASE ` back to ` 0 ` .
974990
975991Amend the current commit to apply the changes:
976992
@@ -1281,9 +1297,9 @@ git node release --prepare --startLTS
12811297To mark a release line as LTS, the following changes must be made to
12821298` src/node_version.h ` :
12831299
1284- * The ` NODE_MINOR_VERSION ` macro must be incremented by one
1285- * The ` NODE_PATCH_VERSION ` macro must be set to ` 0 `
1286- * The ` NODE_VERSION_IS_LTS ` macro must be set to ` 1 `
1300+ * The ` NODE_MINOR_VERSION ` macro must be incremented by one.
1301+ * The ` NODE_PATCH_VERSION ` macro must be set to ` 0 ` .
1302+ * The ` NODE_VERSION_IS_LTS ` macro must be set to ` 1 ` .
12871303* The ` NODE_VERSION_LTS_CODENAME ` macro must be set to the code name selected
12881304 for the LTS release.
12891305
@@ -1352,15 +1368,15 @@ from cutting a minor or patch release.
13521368
13531369### Schedule
13541370
1355- New Node.js Major releases happen twice per year:
1371+ New Node.js Major releases happen once per year:
13561372
1357- * Even-numbered releases are cut in April .
1358- * Odd-numbered releases are cut in October .
1373+ * Branch-off is in October .
1374+ * Semver-major release is in April .
13591375
13601376Major releases should be targeted for the third Tuesday of the release month.
13611377
13621378A major release must not slip beyond the release month. In other words, major
1363- releases must not slip into May or November .
1379+ releases must not slip into May.
13641380
13651381The @nodejs/releasers make a call for releasers 3 months in advance.
13661382Currently, this call is automated in the ` #nodejs-release-private `
@@ -1370,26 +1386,25 @@ The release date for the next major release should be announced immediately
13701386following the current release (e.g. the release date for 13.0.0 should be
13711387announced immediately following the release of 12.0.0).
13721388
1373- ### Release branch
1389+ ### Branch-off (October)
13741390
1375- Approximately two months before a major release, new ` vN.x ` and
1376- ` vN.x-staging ` branches (where ` N ` indicates the major release) should be
1377- created as forks of the ` main ` branch. Up until the cut-off date announced by
1378- the releaser, these must be kept in sync with ` main ` .
1391+ #### Release branch
13791392
1380- The ` vN.x ` and ` vN.x-staging ` branches must be kept in sync with one another
1381- up until the date of the release.
1393+ Approximately six months before a major release, new ` vN.x ` and
1394+ ` vN.x-staging ` branches (where ` N ` indicates the major release) should be
1395+ created as forks of the ` main ` branch. Alpha releases should be released picking
1396+ up commits from ` main ` . Target the first alpha release to be released the same
1397+ day as the previous release line is graduated to LTS status.
13821398
13831399If a ` SEMVER-MAJOR ` pull request lands on the default branch within one month
13841400prior to the major release date, it must not be included on the new major
13851401staging branch, unless there is consensus from the Node.js releasers team to
13861402do so. This measure aims to ensure better stability for the release candidate
13871403(RC) phase, which begins approximately two weeks prior to the official release.
13881404By restricting ` SEMVER-MAJOR ` commits in this period, we provide more time for
1389- thorough testing and reduce the potential for major breakages, especially in
1390- LTS lines.
1405+ thorough testing and reduce the potential for major breakages.
13911406
1392- ### Create release labels
1407+ #### Create release labels
13931408
13941409The following issue labels must be created:
13951410
@@ -1404,31 +1419,17 @@ The label description can be copied from existing labels of previous releases.
14041419The label color must be the same for all new labels, but different from the
14051420labels of previous releases.
14061421
1407- ### Release proposal
1422+ #### Initial Alpha release proposal
14081423
1409- A draft release proposal should be created 6 weeks before the release. A
1424+ A draft release proposal should be created before the release. A
14101425separate ` vN.x-proposal ` branch should be created that tracks the ` vN.x `
14111426branch. This branch will contain the draft release commit (with the draft
14121427changelog).
14131428
14141429Notify the ` @nodejs/npm ` team in the release proposal PR to inform them of the
14151430upcoming release.
14161431
1417- To keep the branch in sync until the release date, it can be as simple as
1418- doing the following:
1419-
1420- > Make sure to check that there are no PRs with the label ` dont-land-on-vX.x ` .
1421-
1422- ``` bash
1423- git checkout vN.x
1424- git reset --hard upstream/main
1425- git checkout vN.x-staging
1426- git reset --hard upstream/main
1427- git push upstream vN.x
1428- git push upstream vN.x-staging
1429- ```
1430-
1431- ### Update ` NODE_MODULE_VERSION `
1432+ ##### Update ` NODE_MODULE_VERSION `
14321433
14331434This macro in ` src/node_version.h ` is used to signal an ABI version for native
14341435addons. It currently has two common uses in the community:
@@ -1458,24 +1459,12 @@ see a need to bump `NODE_MODULE_VERSION` outside of a major release then
14581459you should consult the TSC. Commits may need to be reverted or a major
14591460version bump may need to happen.
14601461
1461- ### Test releases and release candidates
1462-
1463- Test builds should be generated from the ` vN.x-proposal ` branch starting at
1464- about 6 weeks before the release.
1465-
1466- Release Candidates should be generated from the ` vN.x-proposal ` branch starting
1467- at about 4 weeks before the release, with a target of one release candidate
1468- per week.
1469-
1470- Always run test releases and release candidates through the Canary in the
1471- Goldmine tool for additional testing.
1472-
1473- ### Changelogs
1462+ ##### Changelogs
14741463
14751464Generating major release changelogs is a bit more involved than minor and patch
14761465changelogs.
14771466
1478- #### Create the changelog file
1467+ ###### Create the changelog file
14791468
14801469In the ` doc/changelogs ` directory, create a new ` CHANGELOG_V{N}.md ` file where
14811470` {N} ` is the major version of the release. Follow the structure of the existing
@@ -1487,7 +1476,7 @@ updated to account for the new `CHANGELOG_V{N}.md` file.
14871476Once the file is created, the root ` CHANGELOG.md ` file must be updated to
14881477reference the newly-created major release ` CHANGELOG_V{N}.md ` .
14891478
1490- #### Generate the changelog
1479+ ###### Generate the changelog
14911480
14921481To generate a proper major release changelog, use the ` branch-diff ` tool to
14931482compare the ` vN.x ` branch against the ` vN-1.x ` branch (e.g. for Node.js 12.0,
@@ -1506,14 +1495,7 @@ $ branch-diff upstream/vN-1.x upstream/vN.x --require-label=semver-minor --group
15061495$ branch-diff upstream/vN-1.x upstream/vN.x --exclude-label=semver-major,semver-minor --group --filter-release --markdown # get all patches
15071496```
15081497
1509- #### Generate the notable changes
1510-
1511- For a major release, all SEMVER-MAJOR commits that are not strictly internal,
1512- test, or doc-related are to be listed as notable changes. Some SEMVER-MINOR
1513- commits may be listed as notable changes on a case-by-case basis. Use your
1514- judgment there.
1515-
1516- ### Update the expected assets
1498+ ##### Update the expected assets
15171499
15181500The promotion script does a basic check that the expected files are present.
15191501Open a pull request in the Build repository to add the list of expected files
@@ -1522,6 +1504,39 @@ version of the release), in the [expected assets][] folder. The change will
15221504need to be deployed onto the web server by a member of the [ build-infra team] [ ]
15231505before the release is promoted.
15241506
1507+ ### Semver-major release (April)
1508+
1509+ #### Release proposal
1510+
1511+ A draft release proposal should be created 6 weeks before the release. A
1512+ separate ` vN.x-proposal ` branch should be created that tracks the ` vN.x `
1513+ branch. This branch will contain the draft release commit (with the draft
1514+ changelog).
1515+
1516+ Notify the ` @nodejs/npm ` team in the release proposal PR to inform them of the
1517+ upcoming release.
1518+
1519+ Major release proposal should contain a single commit, the release one. All
1520+ semver-major changes must have landed in a alpha version before the major is
1521+ released. Semver-major changes that have missed the alpha period will be included
1522+ in the next major release line.
1523+
1524+ ##### Marking a release line as "out of Alpha"
1525+
1526+ To mark a release line as stable, the following changes must be made to
1527+ ` src/node_version.h ` :
1528+
1529+ * Remove ` NODE_ALPHA_MAJOR_VERSION ` , ` NODE_ALPHA_MINOR_VERSION ` , and
1530+ ` NODE_ALPHA_PATCH_VERSION ` .
1531+
1532+ #### Generate the notable changes
1533+
1534+ For a major release, all SEMVER-MAJOR commits that are not strictly internal,
1535+ test, or doc-related are to be listed as notable changes. Some SEMVER-MINOR
1536+ commits may be listed as notable changes on a case-by-case basis. Use your
1537+ judgment there.
1538+ Include the notable changes from the Alpha versions where it applies.
1539+
15251540### Snap
15261541
15271542The Node.js [ Snap] [ ] package has a "default" for installs where the user hasn't
0 commit comments