Skip to content

Commit

Permalink
feat: update to goreleaser v2
Browse files Browse the repository at this point in the history
  • Loading branch information
JGiola committed Jun 6, 2024
1 parent 21f6f10 commit b363661
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
- examples/**

env:
GORELEASER_VERSION: v1.26.2
GORELEASER_VERSION: v2.0.0
jobs:
lint:
name: Lint Code
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
with:
go-version-file: go.mod
- name: Setup Goreleaser
uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811 # v5.1.0
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
version: ${{ env.GORELEASER_VERSION }}
install-only: true
Expand All @@ -105,7 +105,7 @@ jobs:
with:
go-version-file: go.mod
- name: Setup Goreleaser
uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811 # v5.1.0
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
version: ${{ env.GORELEASER_VERSION }}
install-only: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
- cron: 0 5 * * 1 # Run every monday at 5 UTC

env:
GORELEASER_VERSION: v1.26.2
GORELEASER_VERSION: v2.0.0

jobs:
codeql:
Expand All @@ -33,7 +33,7 @@ jobs:
with:
go-version-file: go.mod
- name: Setup Goreleaser
uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811 # v5.1.0
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
version: ${{ env.GORELEASER_VERSION }}
install-only: true
Expand Down
1 change: 1 addition & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
dist: bin

builds:
Expand Down
2 changes: 1 addition & 1 deletion tools/GORELEASER_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.26.2
v2.0.0
2 changes: 1 addition & 1 deletion tools/make/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ $(TOOLS_BIN)/goreleaser: $(TOOLS_DIR)/GORELEASER_VERSION
$(eval GORELEASER_VERSION:= $(shell cat $<))
mkdir -p $(TOOLS_BIN)
$(info Installing goreleaser $(GORELEASER_VERSION) bin in $(TOOLS_BIN))
GOBIN=$(TOOLS_BIN) go install github.com/goreleaser/goreleaser@$(GORELEASER_VERSION)
GOBIN=$(TOOLS_BIN) go install github.com/goreleaser/goreleaser/v2@$(GORELEASER_VERSION)
15 changes: 10 additions & 5 deletions tools/make/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,36 @@ endif

ENVTEST_K8S_VERSION?= $(shell cat $(TOOLS_DIR)/ENVTEST_K8S_VERSION)

# needed until the linker warning on macos are fixed
ifeq (Darwin,$(shell uname -s))
MACOS_LINKER_FLAGS ?= -extldflags=-Wl,-ld_classic
endif

.PHONY: test/unit
test/unit:
$(info Running tests...)
go test $(GO_TEST_DEBUG_FLAG) -race ./...
go test $(GO_TEST_DEBUG_FLAG) -ldflags="$(MACOS_LINKER_FLAGS)" -race ./...

.PHONY: test/integration
test/integration:
$(info Running integration tests...)
go test $(GO_TEST_DEBUG_FLAG) -tags=integration -race ./...
go test $(GO_TEST_DEBUG_FLAG) -ldflags="$(MACOS_LINKER_FLAGS)" -tags=integration -race ./...

.PHONY: test/coverage
test/coverage:
$(info Running tests with coverage on...)
go test $(GO_TEST_DEBUG_FLAG) -race -coverprofile=coverage.txt -covermode=atomic ./...
go test $(GO_TEST_DEBUG_FLAG) -ldflags="$(MACOS_LINKER_FLAGS)" -race -coverprofile=coverage.txt -covermode=atomic ./...

.PHONY: test/integration/coverage
test/integration/coverage:
$(info Running ci tests with coverage on...)
go test -tags=integration -race -coverprofile=coverage.txt -covermode=atomic ./...
go test $(GO_TEST_DEBUG_FLAG) -ldflags="$(MACOS_LINKER_FLAGS)" -tags=integration -race -coverprofile=coverage.txt -covermode=atomic ./...

.PHONY: test/conformance test/conformance/setup test/conformance/teardown
test/conformance/setup:
test/conformance:
$(info Running conformance tests...)
go test -count=1 -tags=conformance -race $(GO_TEST_DEBUG_FLAG) $(CONFORMANCE_TEST_PATH)
go test $(GO_TEST_DEBUG_FLAG) -ldflags="$(MACOS_LINKER_FLAGS)" -tags=conformance -race -count=1 $(CONFORMANCE_TEST_PATH)
test/conformance/teardown:

test/show/coverage:
Expand Down

0 comments on commit b363661

Please sign in to comment.