diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c61083c3d..2ad76b976 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -61,7 +61,7 @@ jobs: - name: Upload coverage results uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 with: - file: cover.out + files: cover.out flags: agent env_vars: GO_VERSION,TEST_MONGODB_IMAGE fail_ci_if_error: false diff --git a/.goreleaser.yml b/.goreleaser.yml index 04a4e3230..2451884ed 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -2,6 +2,25 @@ dist: build version: 2 builds: - binary: mongodb_exporter + env: + goos: + - linux + - darwin + - windows + goarch: + - amd64 + - arm + - arm64 + goarm: + - 7 + ignore: + - goos: darwin + goarch: arm + flags: + - -v + ldflags: + - -s -w -X main.version=v{{.Version}} -X main.commit={{.ShortCommit}} -X main.buildDate={{.Date}} + - binary: mongodb_exporter.gssapi env: - CGO_ENABLED=1 goos: diff --git a/Makefile b/Makefile index 354d59f8f..ceac7812d 100644 --- a/Makefile +++ b/Makefile @@ -71,7 +71,7 @@ init: ## Install linters cd tools && go generate -x -tags=tools build: ## Compile using plain go build - CGO_ENABLED=1 go build -ldflags="$(GO_BUILD_LDFLAGS)" -o $(PMM_RELEASE_PATH)/mongodb_exporter -tags gssapi + go build -ldflags="$(GO_BUILD_LDFLAGS)" -o $(PMM_RELEASE_PATH)/mongodb_exporter release: ## Build the binaries using goreleaser docker run --rm --privileged \