Skip to content

Commit 9d6937e

Browse files
committed
Fix bug
1 parent d0c3688 commit 9d6937e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ jobs:
4444
if [[ "$VERSION" == "" ]]; then
4545
VERSION="dev"
4646
fi
47-
go build -v -ldflags "-X main.Version=$VERSION" -o disk-health-monitor${{ matrix.suffix }} .
47+
# 假设main.go在cmd/monitor目录下
48+
cd cmd/monitor
49+
go build -v -ldflags "-X main.Version=$VERSION" -o ../../disk-health-monitor${{ matrix.suffix }} .
4850
4951
- name: Upload build artifacts
50-
uses: actions/upload-artifact@v4 # Updated from v3 to v4
52+
uses: actions/upload-artifact@v4
5153
with:
5254
name: disk-health-monitor-${{ matrix.os }}-${{ matrix.arch }}
5355
path: disk-health-monitor${{ matrix.suffix }}
@@ -62,7 +64,7 @@ jobs:
6264
- uses: actions/checkout@v4
6365

6466
- name: Download all artifacts
65-
uses: actions/download-artifact@v4 # Updated from v3 to v4
67+
uses: actions/download-artifact@v4
6668

6769
- name: Display structure of downloaded files
6870
run: ls -R
@@ -103,4 +105,4 @@ jobs:
103105
draft: false
104106
prerelease: false
105107
env:
106-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)