From 2f904a6aa651fd1ae69dbc28a05052cd6481ff8f Mon Sep 17 00:00:00 2001 From: Shohei Ueda <30958501+peaceiris@users.noreply.github.com> Date: Sat, 14 Dec 2019 17:42:59 +0900 Subject: [PATCH] chore: enhance workflow --- .github/workflows/update-major-tag.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-major-tag.yml b/.github/workflows/update-major-tag.yml index d12c717..6cd77cc 100644 --- a/.github/workflows/update-major-tag.yml +++ b/.github/workflows/update-major-tag.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Update major tag if: github.event.release.prerelease == false @@ -19,6 +19,6 @@ 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 ":refs/tags/${TAG_MAJOR}" + 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 --tags origin