File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change 31
31
-
uses :
benjlevesque/[email protected]
32
32
id : short-sha
33
33
34
- - name : Get tag name
35
- id : vars
36
- run : echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
37
-
38
34
- name : Setup Go
39
35
uses : actions/setup-go@v5
40
36
with :
@@ -57,14 +53,14 @@ jobs:
57
53
github.com/OpenListTeam/OpenList/v4/internal/conf.BuiltAt=${{ github.run_id }}
58
54
github.com/OpenListTeam/OpenList/v4/internal/conf.GitAuthor=The OpenList Projects Contributors <[email protected] >
59
55
github.com/OpenListTeam/OpenList/v4/internal/conf.GitCommit=${{ steps.short-sha.outputs.sha }}
60
- github.com/OpenListTeam/OpenList/v4/internal/conf.Version=${{ steps.vars.outputs.tag }}
56
+ github.com/OpenListTeam/OpenList/v4/internal/conf.Version=${{ github.ref_name }}
61
57
github.com/OpenListTeam/OpenList/v4/internal/conf.WebVersion=rolling
62
58
output : openlist$ext
63
59
64
60
- name : Upload artifact
65
61
uses : actions/upload-artifact@v4
66
62
with :
67
- name : openlist_${{ steps.vars.outputs.tag }}_${{ matrix.target }}
63
+ name : openlist_${{ matrix.target }}
68
64
path : build/*
69
65
70
66
release :
@@ -76,17 +72,13 @@ jobs:
76
72
with :
77
73
path : artifacts
78
74
79
- - name : Get tag name
80
- id : vars
81
- run : echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
82
-
83
75
- name : Create Release
84
76
uses : softprops/action-gh-release@v2
85
77
with :
86
- tag_name : ${{ steps.vars.outputs.tag }}
87
- name : Release ${{ steps.vars.outputs.tag }}
78
+ tag_name : ${{ github.ref_name }}
79
+ name : ${{ github.ref_name }} # 这里保证 release 名称就是 v1.1.1
88
80
draft : false
89
81
prerelease : false
90
- files : artifacts/**/*
82
+ files : artifacts/**/* # 明确包含所有 target 的文件
91
83
env :
92
84
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments