From c4868177e167edb3d8e7396abd2bbce6fcb7acef Mon Sep 17 00:00:00 2001 From: Tero Saarni Date: Tue, 5 Nov 2024 13:29:00 +0200 Subject: [PATCH] Disable CGO from builds --- .github/workflows/release.yml | 8 ++++---- Makefile | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d2a71a..0f64087 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,10 +24,10 @@ jobs: - name: Build run: | - GOOS=linux GOARCH=amd64 go build -v ./cmd/certyaml && tar zcvf certyaml-linux-amd64.tar.gz certyaml && rm certyaml - GOOS=darwin GOARCH=amd64 go build -v ./cmd/certyaml && tar zcvf certyaml-darwin-amd64.tar.gz certyaml && rm certyaml - GOOS=darwin GOARCH=arm64 go build -v ./cmd/certyaml && tar zcvf certyaml-darwin-arm64.tar.gz certyaml && rm certyaml - GOOS=windows GOARCH=amd64 go build -v ./cmd/certyaml && zip certyaml-windows-amd64.zip certyaml.exe && rm certyaml.exe + GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -v ./cmd/certyaml && tar zcvf certyaml-linux-amd64.tar.gz certyaml && rm certyaml + GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -v ./cmd/certyaml && tar zcvf certyaml-darwin-amd64.tar.gz certyaml && rm certyaml + GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -v ./cmd/certyaml && tar zcvf certyaml-darwin-arm64.tar.gz certyaml && rm certyaml + GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -v ./cmd/certyaml && zip certyaml-windows-amd64.zip certyaml.exe && rm certyaml.exe # https://github.com/softprops/action-gh-release - name: Create Release diff --git a/Makefile b/Makefile index 2d317c3..8211b05 100644 --- a/Makefile +++ b/Makefile @@ -9,10 +9,10 @@ lint: go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0 run build: - go build -v ./cmd/certyaml + CGO_ENABLED=0 go build -v ./cmd/certyaml install: - go install -v ./cmd/certyaml + CGO_ENABLED=0 go install -v ./cmd/certyaml update-modules: go get -u -t ./... && go mod tidy