Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
2884eb21
Unverified
Commit
2884eb21
authored
Sep 23, 2026
by
Sebastian "Sebbie" Silbermann
Committed by
GitHub
Sep 23, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[cd] Fix release branch gate and drop dead lerna publish config (#99039)
Mostly just updating obsolete/stale information.
parent
593cec11
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
14 deletions
+29
-14
release-channels-publishing.md
contributing/repository/release-channels-publishing.md
+22
-6
lerna.json
lerna.json
+2
-6
create-release-branch.js
scripts/create-release-branch.js
+3
-1
start-release.js
scripts/start-release.js
+2
-1
No files found.
contributing/repository/release-channels-publishing.md
View file @
2884eb21
# Release Channels and Publishing
# Release Channels and Publishing
Next.js has two release channels:
`stable`
and
`canary`
.
Next.js publishes to several release channels.
`stable`
and
`canary`
are the two
that most users interact with;
`beta`
,
`release-candidate`
, and
`preview`
are
used in the run-up to a major release and for testing unreleased builds.
## Stable
## Stable
...
@@ -8,9 +10,6 @@ The stable release is what is installed when you `npm install next`. This channe
...
@@ -8,9 +10,6 @@ The stable release is what is installed when you `npm install next`. This channe
This channel is published at a regular cadence and follows
[
semantic versioning
](
https://semver.org
)
.
This channel is published at a regular cadence and follows
[
semantic versioning
](
https://semver.org
)
.
Repository maintainers can publish a new stable version using:
`pnpm publish-stable`
.
The command will ask what version to publish
`major`
,
`minor`
, or
`patch`
.
## Canary
## Canary
The canary channel has to be explicitly installed by users through
`npm install next@canary`
.
The canary channel has to be explicitly installed by users through
`npm install next@canary`
.
...
@@ -21,5 +20,22 @@ This channel is published early based on the `canary` branch. It holds all chang
...
@@ -21,5 +20,22 @@ This channel is published early based on the `canary` branch. It holds all chang
By installing
`next@canary`
from time to time you can check if your application is affected by any changes that have not been published yet.
By installing
`next@canary`
from time to time you can check if your application is affected by any changes that have not been published yet.
Repository maintainers can publish a new canary version using:
`pnpm publish-canary`
.
## Publishing
The command will automatically decide the new version tag as it's an increment from the previous version.
Publishing is driven by CI, not by a local command. Repository maintainers
trigger the
[
`Trigger Release`
](
https://github.com/vercel/next.js/actions/workflows/trigger_release.yml
)
workflow, which takes a
`releaseType`
(
`canary`
,
`stable`
,
`release-candidate`
,
`beta`
, or
`preview`
) and, for stable releases, a
`semverType`
(
`patch`
,
`minor`
, or
`major`
). Canary releases also run automatically on a nightly
schedule.
The workflow bumps the version across all packages and pushes the release
commit and tag. That tag then triggers
[
`build_and_deploy.yml`
](
https://github.com/vercel/next.js/actions/workflows/build_and_deploy.yml
)
,
which builds the packages and publishes them to npm under the dist-tag matching
the channel.
Version bumps are restricted to the release branches listed in
`command.version.allowBranch`
in
`lerna.json`
.
`scripts/create-release-branch.js`
adds a new release branch to that list when one is created.
lerna.json
View file @
2884eb21
...
@@ -5,14 +5,10 @@
...
@@ -5,14 +5,10 @@
],
],
"command"
:
{
"command"
:
{
"version"
:
{
"version"
:
{
"exact"
:
true
"exact"
:
true
,
},
"publish"
:
{
"npmClient"
:
"npm"
,
"allowBranch"
:
[
"allowBranch"
:
[
"canary"
"canary"
],
]
"registry"
:
"https://registry.npmjs.org/"
}
}
},
},
"version"
:
"16.4.0-canary.39"
"version"
:
"16.4.0-canary.39"
...
...
scripts/create-release-branch.js
View file @
2884eb21
...
@@ -88,7 +88,9 @@ async function main() {
...
@@ -88,7 +88,9 @@ async function main() {
const existingLerna = JSON.parse(
const existingLerna = JSON.parse(
await fs.promises.readFile(lernaPath, 'utf8')
await fs.promises.readFile(lernaPath, 'utf8')
)
)
existingLerna.command.publish.allowBranch.push(branchName)
// `
allowBranch
` gates `
lerna
version
`, so it lives under `
command
.
version
`.
// Release branches need to be added here or the version bump refuses to run.
existingLerna.command.version.allowBranch.push(branchName)
await fs.promises.writeFile(lernaPath, JSON.stringify(existingLerna, null, 2))
await fs.promises.writeFile(lernaPath, JSON.stringify(existingLerna, null, 2))
...
...
scripts/start-release.js
View file @
2884eb21
...
@@ -199,7 +199,8 @@ async function main() {
...
@@ -199,7 +199,8 @@ async function main() {
if
(
dryRun
)
{
if
(
dryRun
)
{
// So the dry-run can be exercised outside
// So the dry-run can be exercised outside
// of the release branches lerna.json restricts in real publishes.
// of the release branches `command.version.allowBranch` in lerna.json
// restricts real version bumps to.
lernaArgs
.
push
(
'--allow-branch'
,
'**'
)
lernaArgs
.
push
(
'--allow-branch'
,
'**'
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment