[CD] Create Release Branch and Update App Version #29
Workflow file for this run
This file contains 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: "[CD] Create Release Branch and Update App Version" | |
on: | |
schedule: | |
- cron: '0 8 * * 5' # 한국 기준으로 매주 금요일 오후 5시에 실행해요 | |
workflow_dispatch: | |
env: | |
BRANCH_PREFIX: release | |
permissions: | |
contents: write | |
jobs: | |
create-release-branch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Git User Info | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Calculate Release Version | |
id: calculate-distribution-version | |
uses: ./.github/actions/calculate-distribution-version | |
- name: Create Release Branch | |
run: | | |
branch_name="${BRANCH_PREFIX}/${{ steps.calculate-distribution-version.outputs.version_code }}" | |
echo "릴리즈 브랜치 생성" | |
git switch -c $branch_name | |
git push origin $branch_name | |
echo "브랜치 $branch_name 생성했어요" | |
- name: Update App Version | |
uses: ./.github/actions/update-app-version | |
with: | |
year: ${{ steps.calculate-distribution-version.outputs.year }} | |
week_no: ${{ steps.calculate-distribution-version.outputs.week }} | |
hotfix: ${{ steps.calculate-distribution-version.outputs.hotfix }} | |
file: ./app-version.json | |
- name: Update App Version | |
uses: ./.github/actions/create-pull-request-to-release | |
with: | |
branch: "${BRANCH_PREFIX}/${{ steps.calculate-distribution-version.outputs.version_code }}" |