Skip to content

Commit c2cf932

Browse files
committed
chore: 发布通知机器人修复
1 parent 1702f45 commit c2cf932

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

‎.github/workflows/auto-release.yml‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ jobs:
6969
npm_config_legacy_peer_deps: true
7070
run: pnpm release
7171

72+
- name: Extract release version
73+
id: version
74+
run: |
75+
TAG=$(echo "${{ github.event.head_commit.message }}" | grep -oP '@antv/s2-v[\d\.\-a-zA-Z]+' || echo "${{ github.ref_name }}")
76+
echo "tag=${TAG}" >> $GITHUB_OUTPUT
77+
7278
- name: Release success ding talk dev group notify
7379
uses: zcong1993/actions-ding@master
7480
with:
@@ -78,7 +84,7 @@ jobs:
7884
{
7985
"msgtype": "link",
8086
"link": {
81-
"title": "🎉 ${{ github.head_ref || github.ref_name || 'AntV/S2 新版本' }} 发布啦 🎉",
87+
"title": "🎉 ${{ steps.version.outputs.tag || 'AntV/S2 新版本' }} 发布啦 🎉",
8288
"text": "📋 点击查看更新日志",
8389
"messageUrl": "https://github.com/antvis/S2/releases",
8490
"picUrl": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*1PTTQLk3j5AAAAAAAAAAAAAADmJ7AQ/original"
@@ -94,7 +100,7 @@ jobs:
94100
{
95101
"msgtype": "link",
96102
"link": {
97-
"title": "🎉 ${{ github.head_ref || github.ref_name || 'AntV/S2 新版本' }} 发布啦 🎉",
103+
"title": "🎉 ${{ steps.version.outputs.tag || 'AntV/S2 新版本' }} 发布啦 🎉",
98104
"text": "📋 点击查看更新日志",
99105
"messageUrl": "https://github.com/antvis/S2/releases",
100106
"picUrl": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*1PTTQLk3j5AAAAAAAAAAAAAADmJ7AQ/original"
@@ -110,7 +116,7 @@ jobs:
110116
{
111117
"msgtype": "link",
112118
"link": {
113-
"title": "🎉 ${{ github.head_ref || github.ref_name || 'AntV/S2 新版本' }} 发布啦 🎉",
119+
"title": "🎉 ${{ steps.version.outputs.tag || 'AntV/S2 新版本' }} 发布啦 🎉",
114120
"text": "📋 点击查看更新日志",
115121
"messageUrl": "https://github.com/antvis/S2/releases",
116122
"picUrl": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*1PTTQLk3j5AAAAAAAAAAAAAADmJ7AQ/original"

0 commit comments

Comments
 (0)