提交 61b81bd5 编写于 作者: M Mislav Marohnić

[ci] Create a non-draft release from annotated tag

If a git tag was annotated, assume that it contains full release notes
and make a public release rather than a draft one.
上级 ca7dab45
......@@ -17,8 +17,12 @@ while read -r filename label; do
assets+=( -a "${filename}#${label}" )
done
notes="$(git tag --list "v${version}" --format='%(contents:subject)%0a%0a%(contents:body)')"
if hub release --include-drafts | grep -q "^v${version}\$"; then
hub release edit "v${version}" -m "" "${assets[@]}"
elif [ $(wc -l <<<"$notes") -gt 1 ]; then
hub release create ${pre:+--prerelease} -F - "v${version}" "${assets[@]}" <<<"$notes"
else
{ echo "${project_name} ${version}"
echo
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册