我正在使用语义发布,并且正在尝试使用配置创建预发布
module.exports = {
branches: [{ name: 'master', prerelease: true }],
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
[
'@semantic-release/github',
{
assets: [ { path: 'dist.zip', label: 'PWA App' } ],
},
],
],
};
如您所见,branches
它只是一个具有名称和预发布的对象(我也尝试用作数组,同样的问题)
有错误的公共存储库:
https ://github.com/Ridermansb/react-firebase-ssr/runs/813996442?check_suite_focus=true
错误
语义发布“--dry-run”“--debug”
[6:31:02 PM] [semantic-release] › ℹ 运行语义发布版本 17.1.1 [6:31:02 PM] [semantic-release] › ✔ 从“@semantic-release/”加载插件“verifyConditions” github" [6:31:02 PM] [semantic-release] › ✔ 从“@semantic-release/commit-analyzer”加载插件“analyzeCommits” [6:31:02 PM] [semantic-release] › ✔ 加载插件“generateNotes”来自“@semantic-release/release-notes-generator”[6:31:02 PM] [semantic-release] › ✔ 从“@semantic-release/github”加载插件“publish”[6:31: 02 PM] [semantic-release] › ✔ 从“@semantic-release/github”加载插件“addChannel” [6:31:02 PM] [semantic-release] › ✔ 从“@semantic-release”加载插件“success” /github" [6:31:02 PM] [semantic-release] › ✔ 从“@semantic-release/github”加载插件“失败”[6:31:10 PM] [semantic-release] › ⚠ 跳过插件“@semantic-”的步骤“失败”发布/github”在试运行模式下
分支配置( https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#branches)中需要最少 1 个和最多 3 个发布分支。
如果您的存储库没有发布分支(例如 master),则可能会发生这种情况。
您对有问题的分支的配置是 []。
{ AggregateError: SemanticReleaseError: 发布分支在
branches
配置中无效。在 module.exports (/Users/ridermansb/Projects/meve.ai/web/node_modules/semantic-release/lib/get-error.js:6:10) 在 Object.entries.reduce (/Users/ridermansb/Projects/ meve.ai/web/node_modules/semantic-release/lib/branches/index.js:44:19) 在 Array.reduce () 在 module.exports (/Users/ridermansb/Projects/meve.ai/web/node_modules/ semantic-release/lib/branches/index.js:34:46) 在 module.exports (/Users/ridermansb/Projects/meve.ai/web/node_modules/semantic-release/lib/branches/index.js:66: 11) 在 process._tickCallback (internal/process/next_tick.js:68:7) 名称:'AggregateError'}npm ERR!代码生命周期
我还在语义发布/github和语义发布/语义发布repo上创建票证