ci: Enhance tag creation

This commit is contained in:
peaceiris 2020-01-18 01:39:09 +09:00
parent 5ce129c278
commit 7d9bfa0c1d
1 changed files with 2 additions and 3 deletions

View File

@ -19,6 +19,5 @@ jobs:
git remote set-url origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" 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_NAME="${GITHUB_REF##refs/tags/}"
export TAG_MAJOR="${TAG_NAME%%.*}" 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 --force -a "${TAG_MAJOR}" -m "Release ${TAG_NAME}"
git tag "${TAG_MAJOR}" -m "Release ${TAG_NAME}" || true git push --force origin "${TAG_MAJOR}"
git push origin "${TAG_MAJOR}"