From 7d9bfa0c1d5a9fe98246cf06033890d624a717f0 Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Sat, 18 Jan 2020 01:39:09 +0900 Subject: [PATCH] ci: Enhance tag creation --- .github/workflows/update-major-tag.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-major-tag.yml b/.github/workflows/update-major-tag.yml index 288765e..c06cab8 100644 --- a/.github/workflows/update-major-tag.yml +++ b/.github/workflows/update-major-tag.yml @@ -19,6 +19,5 @@ jobs: git remote set-url origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" export TAG_NAME="${GITHUB_REF##refs/tags/}" export TAG_MAJOR="${TAG_NAME%%.*}" - git tag "${TAG_MAJOR}" -m "Release ${TAG_NAME}" || git tag -d "${TAG_MAJOR}" ; git push origin --delete "${TAG_MAJOR}" - git tag "${TAG_MAJOR}" -m "Release ${TAG_NAME}" || true - git push origin "${TAG_MAJOR}" + git tag --force -a "${TAG_MAJOR}" -m "Release ${TAG_NAME}" + git push --force origin "${TAG_MAJOR}"