修改文件路径
This commit is contained in:
@@ -47,8 +47,8 @@ jobs:
|
|||||||
mkdir -p dist/${GOOS}-${GOARCH}
|
mkdir -p dist/${GOOS}-${GOARCH}
|
||||||
OUT="dist/${GOOS}-${GOARCH}/app"
|
OUT="dist/${GOOS}-${GOARCH}/app"
|
||||||
if [ "${GOOS}" = "windows" ]; then OUT="${OUT}.exe"; fi
|
if [ "${GOOS}" = "windows" ]; then OUT="${OUT}.exe"; fi
|
||||||
# -trimpath/-ldflags 让产物更小更可复现;按你的入口调整 ./cmd/app
|
# -trimpath/-ldflags 让产物更小更可复现;按你的入口调整 ./
|
||||||
go build -trimpath -ldflags="-s -w" -o "${OUT}" ./cmd/app
|
go build -trimpath -ldflags="-s -w" -o "${OUT}" ./
|
||||||
echo "Built ${OUT}"
|
echo "Built ${OUT}"
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ jobs:
|
|||||||
BIN="yourapp"
|
BIN="yourapp"
|
||||||
OUT="dist/${GOOS}-${GOARCH}/${BIN}"
|
OUT="dist/${GOOS}-${GOARCH}/${BIN}"
|
||||||
if [ "${GOOS}" = "windows" ]; then OUT="${OUT}.exe"; fi
|
if [ "${GOOS}" = "windows" ]; then OUT="${OUT}.exe"; fi
|
||||||
go build -trimpath -ldflags="-s -w" -o "${OUT}" ./cmd/app
|
go build -trimpath -ldflags="-s -w" -o "${OUT}" ./
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user