Skip to content

Commit 4aaf2f2

Browse files
committed
Add automatic develop sync after release merge
1 parent 7697dfd commit 4aaf2f2

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

.github/workflows/auto-release.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ jobs:
174174
> ⚠️ **After merging**, the release workflow will automatically:
175175
> 1. Create tag \`$VERSION_TAG\`
176176
> 2. Create GitHub Release
177-
> 3. Build and upload binaries")
177+
> 3. Build and upload binaries
178+
> 4. Sync \`develop\` branch with \`main\`")
178179
179180
echo "pr_url=$PR_URL" >> $GITHUB_OUTPUT
180181
echo "✅ PR created: $PR_URL"
@@ -282,3 +283,21 @@ jobs:
282283
BRANCH="${{ github.event.pull_request.head.ref }}"
283284
gh api -X DELETE "repos/${{ github.repository }}/git/refs/heads/$BRANCH" || true
284285
echo "✅ Branch '$BRANCH' deleted"
286+
287+
- name: '🔄 Sync develop with main'
288+
run: |
289+
git config user.name "github-actions[bot]"
290+
git config user.email "github-actions[bot]@users.noreply.github.com"
291+
292+
# Fetch all branches
293+
git fetch origin develop:develop || true
294+
295+
# Check if develop branch exists
296+
if git show-ref --verify --quiet refs/heads/develop; then
297+
git checkout develop
298+
git merge main -m "Sync develop with main after release ${{ steps.version.outputs.version_tag }}"
299+
git push origin develop
300+
echo "✅ develop branch synced with main"
301+
else
302+
echo "ℹ️ develop branch does not exist, skipping sync"
303+
fi

0 commit comments

Comments
 (0)