From 3974b06df79c3407655c7c8155b90c2ef0ea218a Mon Sep 17 00:00:00 2001 From: "hsj._.06" Date: Fri, 29 Mar 2024 10:24:10 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=A9=20::=20=EC=9E=90=EB=8F=99=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/MoveVersionToMainBranch.yml | 25 +++++++++++++++++ .../workflows/MoveVersionToReleaseBranch.yml | 27 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .github/workflows/MoveVersionToMainBranch.yml create mode 100644 .github/workflows/MoveVersionToReleaseBranch.yml diff --git a/.github/workflows/MoveVersionToMainBranch.yml b/.github/workflows/MoveVersionToMainBranch.yml new file mode 100644 index 00000000..8bbfd470 --- /dev/null +++ b/.github/workflows/MoveVersionToMainBranch.yml @@ -0,0 +1,25 @@ +name: Move version to main branch + +on: + release: + types: [published] + +jobs: + deploy: + runs-on: macOS-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set env + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + + - name: git merge to main + run: | + git config --global user.name 'Team return' + git config --global user.email 'team.return@gmail.com' + git config pull.rebase false + git checkout -t origin/main + echo $(git merge -Xtheirs origin/release -m "🚀 :: Deploy version ${{ env.RELEASE_VERSION }} to AppStore") + git push diff --git a/.github/workflows/MoveVersionToReleaseBranch.yml b/.github/workflows/MoveVersionToReleaseBranch.yml new file mode 100644 index 00000000..c5a51646 --- /dev/null +++ b/.github/workflows/MoveVersionToReleaseBranch.yml @@ -0,0 +1,27 @@ +name: Move version to release branch + +on: + push: + tags: + - '*' + +jobs: + deploy: + runs-on: macOS-latest + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: git merge to release + run: | + git config --global user.name 'Team return' + git config --global user.email 'team.return@gmail.com' + git config pull.rebase false + git checkout -t origin/release + echo $(git merge -Xtheirs origin/develop) + /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${{ github.ref_name }}" Projects/App/Support/Info.plist + git add -A + git commit -m "🚀 :: Deploy version ${{ github.ref_name }} to testflight" + git push