Skip to content

Commit de10055

Browse files
committed
fix: 워크플로우 로직 수정
1 parent 9324183 commit de10055

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
11
name: Release
22

33
on:
4-
pull_request:
5-
types: [closed]
4+
push:
65
branches:
76
- develop
87

98
# 동일한 워크플로우가 동시에 실행되는 것을 방지
109
concurrency: ${{ github.workflow }}-${{ github.ref }}
1110

1211
jobs:
13-
create-release-pr:
14-
if: github.event.pull_request.merged == true
12+
release:
1513
runs-on: ubuntu-latest
1614
steps:
17-
- name: Checkout
15+
- name: Checkout develop
1816
uses: actions/checkout@v3
1917
with:
18+
ref: develop
2019
fetch-depth: 0
2120

21+
- name: Create or update release branch (hard reset)
22+
run: |
23+
git fetch origin
24+
git checkout -B release origin/develop
25+
2226
- name: Setup Node.js
2327
uses: actions/setup-node@v3
2428
with:
@@ -28,19 +32,24 @@ jobs:
2832
- name: Install Dependencies
2933
run: npm ci
3034

31-
- name: Sync Version
35+
- name: Version bump
3236
run: npm run version
3337

34-
- name: Create Release Pull Request
38+
- name: Commit version bump
39+
run: |
40+
git config --global user.name "github-actions[bot]"
41+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
42+
git add .
43+
git commit -m "chore: version bump [release]" || echo "No changes to commit"
44+
git push --force origin release
45+
46+
- name: Create PR to main
3547
uses: peter-evans/create-pull-request@v5
3648
with:
3749
base: main
38-
head: develop
3950
branch: release
40-
title: "🚀 Release: Merge develop to main"
51+
title: "🚀 Release: Merge release to main"
4152
body: |
42-
## 변경사항
43-
${{ github.event.pull_request.title }}
44-
${{ github.event.pull_request.body }}
45-
commit-message: "chore: merge develop to main"
46-
delete-branch: true
53+
## 자동 릴리즈 PR
54+
- 버저닝 커밋 포함
55+
commit-message: "chore: release PR"

0 commit comments

Comments
 (0)