Skip to content

Commit 6fd166b

Browse files
committed
更改自动云编译1
1 parent d018ee5 commit 6fd166b

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ jobs:
3131
- uses: benjlevesque/[email protected]
3232
id: short-sha
3333

34-
- name: Get tag name
35-
id: vars
36-
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
37-
3834
- name: Setup Go
3935
uses: actions/setup-go@v5
4036
with:
@@ -57,14 +53,14 @@ jobs:
5753
github.com/OpenListTeam/OpenList/v4/internal/conf.BuiltAt=${{ github.run_id }}
5854
github.com/OpenListTeam/OpenList/v4/internal/conf.GitAuthor=The OpenList Projects Contributors <[email protected]>
5955
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 }}
6157
github.com/OpenListTeam/OpenList/v4/internal/conf.WebVersion=rolling
6258
output: openlist$ext
6359

6460
- name: Upload artifact
6561
uses: actions/upload-artifact@v4
6662
with:
67-
name: openlist_${{ steps.vars.outputs.tag }}_${{ matrix.target }}
63+
name: openlist_${{ matrix.target }}
6864
path: build/*
6965

7066
release:
@@ -76,17 +72,13 @@ jobs:
7672
with:
7773
path: artifacts
7874

79-
- name: Get tag name
80-
id: vars
81-
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
82-
8375
- name: Create Release
8476
uses: softprops/action-gh-release@v2
8577
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
8880
draft: false
8981
prerelease: false
90-
files: artifacts/**/*
82+
files: artifacts/**/* # 明确包含所有 target 的文件
9183
env:
9284
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)