Skip to content

Commit 48d53a9

Browse files
authored
ci: update tag upstream sync (#17)
* ci: update tag * chore: pull request to dev * chore: update ci upstream sync * refactor: remove pull request to dev for testing
1 parent ae2585a commit 48d53a9

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/upstream-sync.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
git checkout -B master FETCH_HEAD
4343
git push origin master --force
4444
45-
# Count commits for tagging
45+
# Count commits for tagging - this is the master branch commit count
4646
COMMIT_COUNT=$(git rev-list --count HEAD)
4747
echo "COMMIT_COUNT=$COMMIT_COUNT" >> $GITHUB_ENV
4848
@@ -64,6 +64,10 @@ jobs:
6464
6565
BRANCH_NAME="update-dev-from-master-$(date +'%Y-%m-%d-%H-%M')"
6666
git checkout -b $BRANCH_NAME
67+
68+
# Make sure branch contains master content before creating the PR
69+
git merge --no-edit master
70+
6771
git push origin $BRANCH_NAME --force
6872
6973
PR_TITLE="Sync master with upstream release $LATEST_TAG"
@@ -144,10 +148,12 @@ jobs:
144148
145149
echo "PR merged successfully!"
146150
147-
# Create tag
151+
# Create tag using master branch commit count
152+
TAG_NAME="$COMMIT_COUNT"
153+
154+
# Checkout dev to apply the tag
148155
git fetch origin dev
149156
git checkout dev
150-
TAG_NAME="b$COMMIT_COUNT"
151157
152158
# Check if tag exists
153159
if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then

0 commit comments

Comments
 (0)