@@ -136,22 +136,9 @@ jobs:
136136
137137 - name : Sync to develop
138138 run : |
139- echo "🔄 Syncing changes to develop branch..."
139+ echo "🔄 Creating PR to sync changes to develop branch..."
140140
141- # Fetch latest develop
142- git fetch origin develop:develop
143-
144- # Create sync branch
145- SYNC_BRANCH="sync/main-to-develop-$(date +%s)"
146- git checkout -b $SYNC_BRANCH
147-
148- # Merge main changes
149- git merge main --no-ff -m "chore: sync version updates from main"
150-
151- # Push sync branch
152- git push origin $SYNC_BRANCH
153-
154- # Create PR
141+ # Create PR directly from main to develop
155142 VERSION="${{ steps.version-update.outputs.version }}"
156143
157144 {
@@ -163,15 +150,15 @@ jobs:
163150 echo "Version: **v$VERSION**"
164151 echo ""
165152 echo "### ⚡ Auto-merge"
166- echo "This PR should be merged automatically to keep branches in sync."
153+ echo "This PR will be merged automatically to keep branches in sync."
167154 echo ""
168155 echo "---"
169156 echo "*This PR was automatically created by the version update workflow*"
170157 } > pr-body.md
171158
172159 PR_URL=$(gh pr create \
173160 --base develop \
174- --head $SYNC_BRANCH \
161+ --head main \
175162 --title "🔄 Sync: main → develop (v$VERSION)" \
176163 --body-file pr-body.md \
177164 --label "auto-updated")
@@ -187,25 +174,9 @@ jobs:
187174
188175 - name : Sync to staging
189176 run : |
190- echo "🔄 Syncing changes to staging branch..."
191-
192- # Checkout main again
193- git checkout main
194-
195- # Fetch latest staging
196- git fetch origin staging:staging
197-
198- # Create sync branch
199- SYNC_BRANCH="sync/main-to-staging-$(date +%s)"
200- git checkout -b $SYNC_BRANCH
201-
202- # Merge main changes
203- git merge main --no-ff -m "chore: sync version updates from main"
204-
205- # Push sync branch
206- git push origin $SYNC_BRANCH
177+ echo "🔄 Creating PR to sync changes to staging branch..."
207178
208- # Create PR
179+ # Create PR directly from main to staging
209180 VERSION="${{ steps.version-update.outputs.version }}"
210181
211182 {
@@ -217,15 +188,15 @@ jobs:
217188 echo "Version: **v$VERSION**"
218189 echo ""
219190 echo "### ⚡ Auto-merge"
220- echo "This PR should be merged automatically to keep branches in sync."
191+ echo "This PR will be merged automatically to keep branches in sync."
221192 echo ""
222193 echo "---"
223194 echo "*This PR was automatically created by the version update workflow*"
224195 } > pr-body-staging.md
225196
226197 PR_URL=$(gh pr create \
227198 --base staging \
228- --head $SYNC_BRANCH \
199+ --head main \
229200 --title "🔄 Sync: main → staging (v$VERSION)" \
230201 --body-file pr-body-staging.md \
231202 --label "auto-updated")
0 commit comments