Skip to content

Commit 3ea3523

Browse files
committed
feat(ci): update publish workflow to trigger on tag push and generate changelog
1 parent 1c76d63 commit 3ea3523

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ name: Publish to npm with pnpm
33

44
# 触发工作流的条件
55
on:
6-
release:
7-
types: [created]
6+
push:
7+
tags:
8+
- v*
89

910
# 工作流执行的任务
1011
jobs:
@@ -65,3 +66,9 @@ jobs:
6566
# 这一行其实在 pnpm v7+ 中已经不是必需的了,因为上面的 config set 已经完成了认证
6667
# 但保留它也无害,可以兼容旧版本
6768
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
69+
70+
# 第九步:生成 changelog
71+
- run: pnpm dlx changelogithub --no-group
72+
continue-on-error: true
73+
env:
74+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)