From 2d36a3ce4d93270ab251793853f430b79a9c7188 Mon Sep 17 00:00:00 2001 From: Dmitry Patsura Date: Fri, 1 Nov 2024 15:55:23 +0100 Subject: [PATCH] chore: Push tag and commit manually --- lerna-publish.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lerna-publish.sh b/lerna-publish.sh index 896f91cdd59c7..3786adf2fedc2 100755 --- a/lerna-publish.sh +++ b/lerna-publish.sh @@ -11,4 +11,11 @@ BUMP=$1 if [ "x$BUMP" == "x" ]; then BUMP=patch fi -yarn lerna version --create-release=github --conventional-commits --exact $BUMP + +# In publish workflow we need to detect branch for tags from github.event.base_ref +# It's possible only when GitHub receives information of tag from separate push +# Lerna uses single push for commit & tag, that's why --no-push is passed and pushed manually +yarn lerna version --create-release=github --conventional-commits --exact --no-push $BUMP +git push -u origin HEAD +# commitdate doesn't work with lerna tags :( version:refname is not an option, because we have LTS branches +git push origin v$(cat lerna.json | jq -r '.version')