Skip to content

Commit a611181

Browse files
committed
ci: remove back-merge main to develop step
Remove the back-merge step that automatically synced changes from the main branch to develop after a release. This eliminates the complex automatic conflict resolution logic that tried to merge or force-resolve merge conflicts. Simplifies the release workflow by avoiding potentially risky forced pushes to develop and reduces complexity in the CI process.
1 parent b625c12 commit a611181

1 file changed

Lines changed: 0 additions & 44 deletions

File tree

.github/workflows/ci-semantic-release.yml

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -179,50 +179,6 @@ jobs:
179179
### 📋 What's Changed
180180
See the full changelog below for all changes in this release.
181181
182-
# Step 11: Back-merge to develop
183-
- name: Back-merge to develop
184-
env:
185-
GH_TOKEN: ${{ secrets.GH_PAT || secrets.GITHUB_TOKEN }}
186-
run: |
187-
# Fetch latest branches
188-
git fetch origin develop:refs/remotes/origin/develop
189-
git fetch origin main:refs/remotes/origin/main
190-
191-
# Checkout develop
192-
git checkout -B develop origin/develop
193-
194-
# Try to merge main with strategy to automatically resolve conflicts
195-
# Using -X theirs to always take changes from main when conflicts occur
196-
echo "🔄 Attempting to merge main into develop..."
197-
198-
if git merge origin/main -X theirs -m "chore: back-merge main to develop after v${{ steps.get-version.outputs.version }} release" --no-edit; then
199-
echo "✅ Merge successful (conflicts auto-resolved using main's version)"
200-
# Push to develop
201-
git push origin develop
202-
echo "✅ Successfully pushed merged changes to develop"
203-
else
204-
# This should rarely happen with -X theirs, but handle it just in case
205-
echo "⚠️ Unexpected merge failure even with auto-resolution. Attempting force resolution..."
206-
207-
# Reset to develop and try a different approach
208-
git reset --hard origin/develop
209-
210-
# Create a temporary branch from main
211-
git checkout -B temp-main origin/main
212-
213-
# Merge develop into this branch (reverse merge) and take all from main
214-
git merge origin/develop --strategy=ours -m "chore: back-merge main to develop after v${{ steps.get-version.outputs.version }} release (force resolved)"
215-
216-
# Now force push this as the new develop
217-
git branch -f develop HEAD
218-
git checkout develop
219-
220-
# Push the resolved develop branch
221-
git push origin develop --force-with-lease
222-
223-
echo "✅ Force-resolved conflicts by taking all changes from main"
224-
fi
225-
226182
# Step 12: Summary
227183
- name: Release Summary
228184
run: |

0 commit comments

Comments
 (0)