Skip to content

Commit 6bcf449

Browse files
authored
Merge pull request #346 from ouillie/main
Build statically-linked pre-built binaries
2 parents dd029f4 + 5848cc6 commit 6bcf449

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/release.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,15 @@ jobs:
3333
go-version-file: go.mod
3434

3535
- name: Run Go tests
36+
env:
37+
# Test with the same environment as the build.
38+
CGO_ENABLED: 0
3639
run: go test ${{ env.go-modules }}
3740

3841
- name: Build binary
42+
env:
43+
# Disable cgo so the pre-built binary is statically linked for maximum compatibility.
44+
CGO_ENABLED: 0
3945
run: |
4046
mkdir -p build
4147
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o wit-bindgen-go ./cmd/wit-bindgen-go

0 commit comments

Comments
 (0)