Files

36 lines
1.0 KiB
YAML

name: 🔄 Sync Release Branches To Dev
on:
push:
branches:
- main
- mobile-main
permissions:
contents: write
jobs:
sync-to-dev:
runs-on: ubuntu-latest
if: |
(github.ref == 'refs/heads/main' && contains(github.event.head_commit.message || '', 'release(desktop):')) ||
(github.ref == 'refs/heads/mobile-main' && contains(github.event.head_commit.message || '', 'release(mobile):'))
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Merge source branch into dev
run: |
source_branch="${GITHUB_REF_NAME}"
git fetch origin main mobile-main dev
git checkout dev
git merge --no-ff "origin/${source_branch}" -m "chore(sync): merge ${source_branch} into dev"
git push origin dev