Skip to content

Commit b2dfdf1

Browse files
authored
chore: close issues with release version lable automatically on release (#870)
* chore: 添加自动关闭带版本标签的 issue 的工作流 * ci: 优化关闭 release issue 的 workflow * ci: 更新自动关闭 release issue 的工作流,合并相关逻辑至 auto-release.yml
1 parent 0cf237b commit b2dfdf1

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

.github/workflows/auto-release.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
- "tdesign-component/pubspec.yaml"
99
issue_comment:
1010
types: [edited]
11+
push:
12+
tags:
13+
- "*"
1114

1215
jobs:
1316
generator:
@@ -29,7 +32,7 @@ jobs:
2932
env:
3033
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3134
with:
32-
tag: ${{ steps.tag-action.outputs.version }}
35+
tag: ${{ steps.tag-action.outputs.version }}
3336
- name: Add comment
3437
uses: peter-evans/create-or-update-comment@v1
3538
with:
@@ -86,13 +89,22 @@ jobs:
8689
- uses: TDesignOteam/tdesign-tag-action@main
8790
id: tag-action
8891
with:
89-
token: ${{ secrets.GITHUB_TOKEN }}
90-
version_file: ./tdesign-component/pubspec.yaml
92+
token: ${{ secrets.GITHUB_TOKEN }}
93+
version_file: ./tdesign-component/pubspec.yaml
9194
- name: tag and push if needed
9295
run: |
9396
echo "${{ steps.tag-action.outputs.version }}"
9497
git config --local user.email "github-actions[bot]@users.noreply.github.com"
9598
git config --local user.name "github-actions[bot]"
9699
git tag ${{ steps.tag-action.outputs.version }}
97100
git push origin ${{ steps.tag-action.outputs.version }}
98-
echo "pushed tag ${{ steps.tag-action.outputs.version }}"
101+
102+
close-release-issue:
103+
runs-on: ubuntu-latest
104+
if: startsWith(github.ref, 'refs/tags/')
105+
steps:
106+
- uses: TDesignOteam/workflows/actions/close-release-issue@rss1102/flutter/issue-close
107+
with:
108+
version: ${{ github.ref_name }}
109+
label: ${{ github.ref_name }}
110+
token: ${{ secrets.PERSONAL_TOKEN }}

0 commit comments

Comments
 (0)