From 40f4057077c954b4c7171cf0122fb71514ea31f0 Mon Sep 17 00:00:00 2001 From: msclock Date: Thu, 12 Oct 2023 09:18:51 +0800 Subject: [PATCH] chore: use annotated tags Signed-off-by: msclock --- .releaserc.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.releaserc.js b/.releaserc.js index 9f11c88..25db4f1 100644 --- a/.releaserc.js +++ b/.releaserc.js @@ -49,6 +49,16 @@ module.exports = { }, }, ], + [ + "@semantic-release/exec", + { + publishCmd: [ + "[[ $(git tag -l) =~ (^|[[:space:]])\"v${nextRelease.version}\"($|[[:space:]]) ]] && git tag -d \"v${nextRelease.version}\"", + "git tag -a -f v${nextRelease.version} --cleanup=whitespace -m '${nextRelease.notes}'", + "git push --force origin v${nextRelease.version}" + ].join(" && "), + } + ], ["@semantic-release/changelog", { changelogFile: "CHANGELOG.md" }], [ "@semantic-release/git",