我正在尝试使用包含分支名称的标记格式创建语义发布。该.releaserc
文件看起来像这样:
{
"name": "Inder Semantic Release",
"version": "2.1.0",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator"
],
"tagFormat": "${want_branch_name_here}-${version}",
"branches": ['+([0-9])?(.{+([0-9]),x}).x', 'master', 'next', 'next-major', {name: 'beta', prerelease: true}, {name: 'alpha', prerelease: true}, {name: 'gpu', prerelease: true}, {name: 'non-root'}]
}
我想自动获取标签格式的分支名称(即替换${want_branch_name_here}
为具有分支名称值的所需变量),有没有办法实现这一点?