name
String
or the matching branches name if defined as a glob.channel
false
to force the default distribution channel instead of using the default. See channel.undefined
for the first release branch, the value of name
for subsequent ones.range
name
is formatted like N.N.x
or N.x
(N
is a number). The range of semantic versions to support on this branch. See range.name
.prerelease
name
is required for any type of branch. It can be defined as a glob in which case the definition will be expanded to one per matching branch existing in the repository.name
doesn't match to any branch existing in the repository, the definition will be ignored. For example the default configuration includes the definition next
and next-major
which will become active only when the branches next
and/or next-major
are created in the repository. This allow to define your workflow once with all potential branches you might use and have the effective configuration evolving as you create new branches.['+([0-9])?(.{+([0-9]),x}).x', 'master', 'next']
will be expanded as:channel
can be defined for any branch type. By default releases will be done on the default distribution channel (for example the @latest
dist-tag for npm) for the first release branch and on a distribution channel named based on the branch name
for any other branch. If the channel
property is set to false
the default channel will be used.channel
, if defined as a string, is generated with Lodash template with the variable name
available.['master', {name: 'next', channel: 'channel-${name}'}]
will be expanded as:range
only applies to maintenance branches, is required and must be formatted like N.N.x
or N.x
(N
is a number). In case the name
is formatted as a range (for example 1.x
or 1.5.x
) the branch will be considered a maintenance branch and the name
value will be used for the range
.['1.1.x', '1.2.x', 'master']
will be expanded as:prerelease
property applies only to pre-release branches and the prerelease
value must be valid per the Semantic Versioning Specification. It will determine the name of versions (for example if prerelease
is set to beta
the version be formatted like 2.0.0-beta.1
, 2.0.0-beta.2
etc...). If the prerelease
property is set to true
the name
value will be used.prerelease
, if defined as a string, is generated with Lodash template with the variable name
available.['master', {name: 'pre/rc', prerelease: '${name.replace(/^pre\\//g, "")}'}, {name: 'beta', prerelease: true}]
will be expanded as:EINVALIDNEXTVERSION
error, listing the problematic commits and the valid branches on which to move them."branches": ["master", "next"]
, if the last release published from master
is 1.0.0
and the last one from next
is 2.0.0
then:1.x.x
can be published from master
, so only fix
and feat
commits can be pushed to master
next
get merged into master
the release 2.0.0
will be made available on the channel associated with master
and both master
and next
will accept any commit typefeat
commit on next
which triggers the release of version 1.0.0
on the next
channelnext
into master
which adds 1.0.0
on the default channelfeat
commit on next
which triggers the release of version 1.1.0
on the next
channelfeat
commit on master
which would attempt to release the version 1.1.0
on the default channelEINVALIDNEXTVERSION
error to prevent the attempt at releasing version 1.1.0
which was already released on step 3 with a different codebase. The error will indicate that the commit should be created on next
instead. Alternatively if the next
branch is merged into master
, the version 1.1.0
will be made available on the default channel and the feat
commit would be allowed on master
to release 1.2.0
.range
value of each maintenance branch must be unique across the project.EINVALIDNEXTVERSION
error, listing the problematic commits and the valid branches on which to move them.range
can be merged. If a merged version is outside the maintenance branch range
, semantic-release will not add to the corresponding channel and will throw an EINVALIDMAINTENANCEMERGE
error."branches": ["1.0.x", "1.x", "master"]
, if the last release published from master
is 1.5.0
then:>=1.0.0 <1.1.0
can be published from 1.0.x
, so only fix
commits can be pushed to 1.0.x
>=1.1.0 <1.5.0
can be published from 1.x
, so only fix
and feat
commits can be pushed to 1.x
as long the resulting release is lower than 1.5.0
2.0.0
is released from master
, versions in range >=1.1.0 <2.0.0
can be published from 1.x
, so any number of fix
and feat
commits can be pushed to 1.x
"branches": ["1.0.x", "1.x", "master"]
, if the last release published from master
is 1.0.0
then:1.0.x
from master
will make the 1.0.0
release available on the 1.0.x
distribution channelfix
commit on the 1.0.x
branch will release the version 1.0.1
on the 1.0.x
distribution channel1.x
from master
will make the 1.0.0
release available on the 1.x
distribution channel1.0.x
into 1.x
will make the version 1.0.1
available on the 1.x
distribution channel1.0.0-alpha.1
the identifier is alpha.1
). This is useful when you need to work on a future major release that will include many breaking changes but you do not want to increment the version number for each breaking change commit.prerelease
property that defines the static part of the version released (in 1.0.0-alpha.1
the static part fo the identifier is alpha
). The prerelease
value of each pre-release branch must be unique across the project."branches": ["master", {"name": "beta", "prerelease": true}]
, if the last release published from master
is 1.0.0
then:BREAKING CHANGE
commit on the beta
branch will release the version 2.0.0-beta.1
on the beta
distribution channelfix
, feat
or a BREAKING CHANGE
commit on the beta
branch will release the version 2.0.0-beta.2
(then 2.0.0-beta.3
, 2.0.0-beta.4
, etc...) on the beta
distribution channel"branches": ["master", {"name": "beta", "prerelease": true}]
, if the last release published from master
is 1.0.0
and the last one published from beta
is 2.0.0-beta.1
then:fix
commit on the master
branch will release the version 1.0.1
on the default distribution channelmaster
into beta
will release the version 2.0.0-beta.2
on the beta
distribution channel