Sync Back to Development #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sync Back to Development | |
| on: | |
| workflow_run: | |
| workflows: ["Semantic Release"] | |
| types: | |
| - completed | |
| jobs: | |
| sync-branches: | |
| runs-on: ubuntu-latest | |
| # Only run if the Release workflow succeeded | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Merge main into development | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| # Checkout development | |
| git checkout development | |
| # Merge origin/main (which has the new version/tag) into development | |
| git merge origin/main | |
| # Push the update back to development | |
| git push origin development |