diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9545d34c..626e71b8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,8 +48,10 @@ jobs: echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV git config --global user.name "GitHub Actions" git config --global user.email "github-actions@example.com" - git tag -f $TAG_NAME - git push origin $TAG_NAME + if ! git rev-parse $TAG_NAME >/dev/null 2>&1; then + git tag $TAG_NAME + git push origin $TAG_NAME + fi env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}