We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a92573 commit eccc126Copy full SHA for eccc126
.github/workflows/publish.yml
@@ -209,7 +209,13 @@ jobs:
209
run: |
210
git config user.name "github-actions[bot]"
211
git config user.email "github-actions[bot]@users.noreply.github.com"
212
- git tag "go/v${{ needs.version.outputs.version }}"
213
- git push origin "go/v${{ needs.version.outputs.version }}"
+ TAG_NAME="go/v${{ needs.version.outputs.version }}"
+ if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then
214
+ echo "Tag $TAG_NAME already exists, skipping"
215
+ else
216
+ git tag "$TAG_NAME"
217
+ git push origin "$TAG_NAME"
218
+ echo "Created and pushed tag $TAG_NAME"
219
+ fi
220
env:
221
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
0 commit comments