feat: add automated production release workflow

This commit is contained in:
Prad Nukala
2024-09-23 12:25:15 -04:00
parent 05bda3d1b2
commit c31b324bd3
217 changed files with 19760 additions and 56358 deletions
+45
View File
@@ -0,0 +1,45 @@
name: Sync Branches
on:
push:
tags:
- "*"
permissions:
contents: write
jobs:
sync-branches:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check if tag is on develop or master
id: check-branch
run: |
if git branch -r --contains ${{ github.ref }} | grep -q 'origin/develop\|origin/master'; then
echo "SYNC_NEEDED=true" >> $GITHUB_OUTPUT
else
echo "SYNC_NEEDED=false" >> $GITHUB_OUTPUT
fi
- name: Sync develop to master
if: steps.check-branch.outputs.SYNC_NEEDED == 'true'
uses: devmasx/merge-branch@master
with:
type: now
from_branch: develop
target_branch: master
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Sync master back to develop
if: steps.check-branch.outputs.SYNC_NEEDED == 'true'
uses: devmasx/merge-branch@master
with:
type: now
from_branch: master
target_branch: develop
github_token: ${{ secrets.GITHUB_TOKEN }}