diff --git a/.github/workflows/sync-main-on-release.yml b/.github/workflows/sync-main-on-release.yml new file mode 100644 index 00000000..bd24fac2 --- /dev/null +++ b/.github/workflows/sync-main-on-release.yml @@ -0,0 +1,26 @@ +name: Sync branch + +on: + release: + types: [published] + branches: [dev] + +jobs: + force-push-main: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + + - name: Force push dev to main + run: | + git fetch origin + git checkout dev + git push origin dev:main --force \ No newline at end of file