fix: 워크플로우 로직 수정 #20
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: Release | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| # 동일한 워크플로우가 동시에 실행되는 것을 방지 | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout develop | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: develop | |
| fetch-depth: 0 | |
| - name: Create release branch | |
| run: | | |
| git checkout -b release/$(date +'%y%m%d%H%M%S') | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 18 | |
| cache: "npm" | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Version bump | |
| run: npm run version | |
| - name: Commit version bump | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git add . | |
| git commit -m "chore: version bump [release]" | |
| git push --set-upstream origin HEAD | |
| - name: Create PR to main | |
| uses: peter-evans/create-pull-request@v5 | |
| with: | |
| base: main | |
| branch: ${{ github.ref_name }} | |
| title: "🚀 Release: Merge release to main" | |
| body: | | |
| ## 자동 릴리즈 PR | |
| - 버저닝 커밋 포함 | |
| commit-message: "chore: release PR" |