Skip to content

Commit 867fae4

Browse files
authored
ci(release): modify ci to release when tag add and change the release… (#38)
* docs: add contributors markdown * ci(release): modify ci to release when tag add and change the release-it to create new branch
1 parent 9139025 commit 867fae4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/release-cli.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
build:
1010
runs-on: ubuntu-latest
11-
if: github.repository == 'EternalHeartTeam/leetcode-practice' && github.ref == 'refs/heads/master'
11+
if: github.repository == 'EternalHeartTeam/leetcode-practice'
1212
steps:
1313
- uses: actions/checkout@v3
1414
# Setup .npmrc file to publish to npm

.release-it.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"git": {
88
"commitMessage": "chore: release v${version}",
99
"tagName": "cli-v${version}",
10-
"branch": "stable-v${version}",
1110
"tag": true,
1211
"push": true,
1312
"pushArgs": ["--follow-tags"]
@@ -16,7 +15,8 @@
1615
"publish": false
1716
},
1817
"hooks": {
19-
"after:bump": "git add CHANGELOG.md && echo 更新版本成功!添加changelog的commit成功!"
18+
"after:bump": "git add CHANGELOG.md && echo 更新版本${version}成功!添加changelog的commit成功!",
19+
"after:release": "git checkout master && git checkout -b stable-v${version} && git push origin stable-v${version}"
2020
},
2121
"plugins": {
2222
"@release-it/bumper": {

0 commit comments

Comments
 (0)