We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 678ac0c commit 613b270Copy full SHA for 613b270
1 file changed
.github/workflows/push-test.yml
@@ -0,0 +1,30 @@
1
+name: Release
2
+
3
+permissions:
4
+ contents: write
5
6
+on:
7
+ workflow_dispatch: # 允许手动触发
8
+ push:
9
+ branches:
10
+ - main # 监听 main 分支
11
12
+jobs:
13
+ build:
14
+ name: test
15
+ runs-on: ubuntu-latest
16
17
+ steps:
18
+ - name: 检出代码
19
+ uses: actions/checkout@v4
20
21
+ - name: 获取当前和上一个标签
22
+ id: get_tags
23
+ run: |
24
+ git fetch --prune --unshallow
25
+ git tag -l --sort=-version:refnam
26
+ tags=($(git tag -l --sort=-version:refname))
27
+ current_tag=${tags[0]}
28
+ previous_tag=${tags[1]}
29
+ echo "previous_tag=$previous_tag" >> $GITHUB_OUTPUT
30
+ echo "current_tag=$current_tag" >> $GITHUB_OUTPUT
0 commit comments