semantic-release - 是否可以只发布带有语义发布的预发布?
问题描述
我想使用语义发布只发布预发布。
我有这个配置在我的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 [].
只要我添加另一个(不是预发布)分支,它就可以工作。
是否可以只配置预发布分支?
解决方案
我通过创建一个我不会推送的稳定分支解决了这个问题。这不是最优雅的解决方案,但目前有效。
推荐阅读
- unity3d - 从给定点和角度找到矢量幅度的最便宜方法
- python-3.x - 我无法使用条目小部件中的文本
- php - 无法对与 Doctrine 的一对多关联进行排序
- asp.net-core - swagger : 无法加载 API 定义 undefined /swagger/v1/swagger.json
- html - {xml_nodeset (0)} 尝试重现网页抓取示例时出现问题(不要认为这是 JS 问题)
- c# - 基本 ASP.NET Core 中间件项目中的“响应已开始”异常
- c - 结构内的字符串被覆盖,我不知道为什么
- php - Laravel 错误:方法 Illuminate\Auth\SessionGuard::venue 不存在
- r - 如何在时间序列数据上创建 facet_grid?
- azure - 从 azure devops 下载 maven artifcats