Files
ccs/.github/workflows/sync-dev-after-release.yml
T
kaitranntt 808a890db3 ci(workflow): add auto-sync dev after main release
Automatically merges main into dev after Release workflow completes.
Keeps dev ahead with next version number after stable releases.
2025-12-04 01:15:13 -05:00

36 lines
960 B
YAML

name: Sync Dev After Main Release
on:
workflow_run:
workflows: ["Release"]
types: [completed]
branches: [main]
jobs:
sync-dev:
# Only run if Release workflow succeeded on main branch
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PAT_TOKEN }}
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Sync dev with main
run: |
git fetch origin main dev
git checkout dev
git merge origin/main --no-edit -m "chore(sync): merge main into dev after release [skip ci]"
git push origin dev