File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 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
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
You can’t perform that action at this time.
0 commit comments