我想使用语义发布只发布预发布。
我有这个配置在我的package.json
:
"release": {
"branches": [
{
"name": "main",
"prerelease": "alpha",
"channel": "alpha"
}
]
}
但是如果我运行npx semantic-release
我会遇到以下错误:
ERELEASEBRANCHES The release branches are invalid in the `branches` configuration.
A minimum of 1 and a maximum of 3 release branches are required in the branches configuration (https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#branches).
This may occur if your repository does not have a release branch, such as master.
Your configuration for the problematic branches is [].
只要我添加另一个(不是预发布)分支,它就可以工作。
是否可以只配置预发布分支?