Go: fix cgo build (#16724)

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-07-07 21:15:14 +08:00
committed by GitHub
parent 2b95fa2ba4
commit cb93883f3f

View File

@@ -424,6 +424,7 @@ jobs:
output="${DIST_DIR}/${CLI_NAME}-${RELEASE_TAG}-${{ matrix.goos }}-${{ matrix.goarch }}"
echo "Building ${{ matrix.goos }}/${{ matrix.goarch }} -> ${output}"
CGO_ENABLED=0 \
GOOS="${{ matrix.goos }}" \
GOARCH="${{ matrix.goarch }}" \
go build \
@@ -458,6 +459,7 @@ jobs:
exit 1
}
$env:CGO_ENABLED = "0"
$env:CC = $cc
$env:GOOS = "${{ matrix.goos }}"
$env:GOARCH = "${{ matrix.goarch }}"