Skip to content

Commit 5ddd731

Browse files
authored
chore: update upstream sync ci (#34)
1 parent f98f3f5 commit 5ddd731

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/upstream-sync.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,18 @@ jobs:
156156
157157
git fetch origin dev
158158
git checkout -B dev origin/dev
159-
159+
160160
# Create tag using master branch commit count
161161
TAG_NAME="b$COMMIT_COUNT"
162-
162+
163+
# Delete the tag if it already exists (both locally and remotely)
164+
if git tag -l "$TAG_NAME" | grep -q "$TAG_NAME"; then
165+
echo "Tag $TAG_NAME already exists. Deleting it first..."
166+
git tag -d "$TAG_NAME" || true
167+
git push --delete origin "$TAG_NAME" || true
168+
echo "Existing tag deleted."
169+
fi
170+
163171
# Create tag on the current commit (dev branch HEAD after merge)
164172
git tag "$TAG_NAME"
165173
git push origin "$TAG_NAME"

0 commit comments

Comments
 (0)