@@ -138,90 +138,35 @@ jobs:
138138 run : |
139139 echo "🔄 Syncing changes to develop branch..."
140140
141- # Fetch latest develop
141+ # Fetch and checkout develop
142142 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
143+ git checkout develop
147144
148145 # Merge main changes
149146 git merge main --no-ff -m "chore: sync version updates from main"
150147
151- # Push sync branch
152- git push origin $SYNC_BRANCH
153-
154- # Create PR
155- VERSION="${{ steps.version-update.outputs.version }}"
148+ # Push directly to develop
149+ git push origin develop
156150
157- {
158- echo "## 🔄 Version Sync from Main"
159- echo ""
160- echo "### 📦 Updated Versions"
161- echo "This PR syncs the stable version updates from main to develop."
162- echo ""
163- echo "Version: **v$VERSION**"
164- echo ""
165- echo "### ⚡ Auto-merge"
166- echo "This PR should be merged automatically to keep branches in sync."
167- echo ""
168- echo "---"
169- echo "*This PR was automatically created by the version update workflow*"
170- } > pr-body.md
171-
172- gh pr create \
173- --base develop \
174- --head $SYNC_BRANCH \
175- --title "🔄 Sync: main → develop (v$VERSION)" \
176- --body-file pr-body.md \
177- --label "auto-updated"
151+ echo "✅ Successfully synced main to develop"
178152 env :
179153 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
180154
181155 - name : Sync to staging
182156 run : |
183157 echo "🔄 Syncing changes to staging branch..."
184158
185- # Checkout main again
186- git checkout main
187-
188- # Fetch latest staging
159+ # Fetch and checkout staging
189160 git fetch origin staging:staging
190-
191- # Create sync branch
192- SYNC_BRANCH="sync/main-to-staging-$(date +%s)"
193- git checkout -b $SYNC_BRANCH
161+ git checkout staging
194162
195163 # Merge main changes
196164 git merge main --no-ff -m "chore: sync version updates from main"
197165
198- # Push sync branch
199- git push origin $SYNC_BRANCH
200-
201- # Create PR
202- VERSION="${{ steps.version-update.outputs.version }}"
166+ # Push directly to staging
167+ git push origin staging
203168
204- {
205- echo "## 🔄 Version Sync from Main"
206- echo ""
207- echo "### 📦 Updated Versions"
208- echo "This PR syncs the stable version updates from main to staging."
209- echo ""
210- echo "Version: **v$VERSION**"
211- echo ""
212- echo "### ⚡ Auto-merge"
213- echo "This PR should be merged automatically to keep branches in sync."
214- echo ""
215- echo "---"
216- echo "*This PR was automatically created by the version update workflow*"
217- } > pr-body-staging.md
218-
219- gh pr create \
220- --base staging \
221- --head $SYNC_BRANCH \
222- --title "🔄 Sync: main → staging (v$VERSION)" \
223- --body-file pr-body-staging.md \
224- --label "auto-updated"
169+ echo "✅ Successfully synced main to staging"
225170 env :
226171 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
227172
0 commit comments