v16.0.0
BREAKING CHANGES
-
⚠️ Forv16.0.0@beta
users only:In v16, a JSON object stored in a Git note is used to keep track of the channels on which a version has been released, the
@{channel}
suffix is no longer necessary.The tags formatted as v{version}@{channel} will now be ignored. If you have releases using this format you will have to upgrade them:
- Find all the versions that have been released on a branch other than the default one by searching for all tags formatted as
v{version}@{channel}
- For each of those version:
- Create a tag without the {@channel} if none doesn't already exists
- Add a Git note to the tag without the {@channel} containing the channels on which the version was released formatted as
{"channels":["channel1","channel2"]}
and usingnull
for the default channel (for example.{"channels":[null,"channel1","channel2"]}
) - Push the tags and notes
- Update the GitHub releases that refer to a tag formatted as v{version}@{channel} to use the tag without it
- Delete the tags formatted as v{version}@{channel}
- Find all the versions that have been released on a branch other than the default one by searching for all tags formatted as
-
Require Node.js >= 10.13
-
Git CLI version 2.7.1 or higher is now required: The
--merge
option of thegit tag
command has been added in Git version 2.7.1 and is now used by semantic-release -
Regexp are not supported anymore for property matching in the
releaseRules
option.Regex are replaced by globs. For example
/core-.*/
should be changed to'core-*'
. -
The
branch
option has been removed in favor ofbranches
-
The new
branches
option expect either an Array or a single branch definition. To migrate your configuration:- If you want to publish package from multiple branches, please see the configuration documentation
- If you use the default configuration and want to publish only from
master
: nothing to change - If you use the
branch
configuration and want to publish only from one branch: replacebranch
withbranches
("branch": "my-release-branch"
=>"branches": "my-release-branch"
)
Features
- allow
addChannel
plugins to returnfalse
in order to signify no release was done (e1c7269) - allow
publish
plugins to returnfalse
in order to signify no release was done (47484f5) - allow to release any version on a branch if up to date with next branch (916c268)
- support multiple branches and distribution channels (7b40524)
- use Git notes to store the channels on which a version has been released (b2c1b2c)
- package: update @semantic-release/commit-analyzer to version 7.0.0 (e63e753)
Performance Improvements
- use
git tag --merge <branch>
to filter tags present in a branch history (cffe9a8)
Bug Fixes
- add
channel
to publish success log (5744c5e) - add a flag indicate which branch is the main one (2caafba)
- Add helpful detail to
ERELEASEBRANCHES
error message (#1188) (37bcc9e) - allow multiple branches with same channel (63f51ae)
- allow to set
ci
option via API and config file (2faff26) - call
getTagHead
only when necessary (de77a79) - call
success
plugin only once for releases added to a channel (9a023b4) - correct log when adding channel to tag (61665be)
- correctly determine next pre-release version (0457a07)
- correctly determine release to add to a channel (aec96c7)
- correctly handle skipped releases (89663d3)
- display erroring git commands properly (1edae67)
- do not call
addChannel
for 2 merged branches configured with the same channel (4aad9cd) - do not create tags in dry-run mode for released to add to a channel (97748c5)
- fetch all release branches on CI (b729183)
- fix branch type regexp to handle version with multiple digits (52ca0b3)
- fix maintenance branch regex (a022996)
- fix range regexp to handle version with multiple digits (9a04e64)
- handle branch properties set to
false
(751a5f1) - harmonize parameters passed to
getError
(f96c660) - ignore lasst release only if pre-release on the same channel as current branch (990e85f)
- increase next version on prerelease branch based on highest commit type (9ecc7a3)
- look also for previous prerelease versions to determine the next one (9772563)
- modify fetch function to handle CircleCI specifics (cbef9d1)
- on maintenance branch add to channel only version >= to start range (c22ae17)
- remove confusing logs when searching for releases to add to a channel (162b4b9)
- remove hack to workaround GitHub Rebase & Merge (844e0b0)
- remove unnecessary
await
(9a1af4d) - simplify
get-tags
algorithm (00420a8) - throws error if the commit associated with a tag cannot be found (1317348)
- update plugin versions (0785a84)
- update plugins dependencies (9890584)
- verify is branch is up to date by comparing remote and local HEAD (a8747c4)
- remove unnecessary
branch
parameter frompush
function (968b996) - revert to the correct refspec in fetch function (9948a74)
- update plugins dependencies (73f0c77)
- repositoryUrl: on beta repositoryUrl needs auth for pre-release flows (#1186) (3610422)