Skip to content

Commit 45394f5

Browse files
author
colyerdeng
committed
fix(ci): update workflow triggers to use release events
- fix: change trigger from tag push to release published - fix: avoid duplicate workflow triggers - fix: update both main repo and template workflows
1 parent e4c86a2 commit 45394f5

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

.github/workflows/deploy_docs.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: Deploy Docs
22

33
on:
4-
push:
5-
tags:
6-
- '[0-9]*.[0-9]*.[0-9]*' # 匹配语义化版本号标签 (e.g., 1.0.0, 1.0.0-beta)
4+
release:
5+
types: [published] # 当 release 发布时触发,而不是创建时
76
workflow_dispatch: # 保留手动触发选项
87

98
permissions:

.github/workflows/release_build.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: release-build
22

33
on:
4-
push:
5-
tags:
6-
- '[0-9]*.[0-9]*.[0-9]*' # 匹配语义化版本号标签 (e.g., 1.0.0, 1.0.0-beta)
4+
release:
5+
types: [published] # 当 release 发布时触发,而不是创建时
76
workflow_dispatch:
87
inputs:
98
version:

repo_scaffold/templates/template-python/{{cookiecutter.project_slug}}/.github/workflows/deploy_docs.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
name: Deploy Docs
33

44
on:
5-
push:
6-
tags:
7-
- '[0-9]*.[0-9]*.[0-9]*' # 匹配语义化版本号标签 (e.g., 1.0.0, 1.0.0-beta)
5+
release:
6+
types: [published] # 当 release 发布时触发,而不是创建时
87
workflow_dispatch: # 保留手动触发选项
98

109
permissions:

repo_scaffold/templates/template-python/{{cookiecutter.project_slug}}/.github/workflows/release_build.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: release_build
22

33
on:
4-
push:
5-
tags:
6-
- '[0-9]*.[0-9]*.[0-9]*' # 匹配语义化版本号标签 (e.g., 1.0.0, 1.0.0-beta)
4+
release:
5+
types: [published] # 当 release 发布时触发,而不是创建时
76
workflow_dispatch:
87
inputs:
98
version:

0 commit comments

Comments
 (0)