Skip to content

Commit

Permalink
fix(ci,makefile): add a new release Makefile target to pass LDFLAGS…
Browse files Browse the repository at this point in the history
… to goreleaser.

Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP authored and poiana committed Sep 27, 2023
1 parent 79ab65a commit 3fd73cb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Publish release
uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b #4.2.0
with:
version: latest
args: release --clean --timeout 60m
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make release
5 changes: 1 addition & 4 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ before:
- go mod tidy

builds:
- env:
- CGO_ENABLED=0
- GO111MODULE=on
- GOEXPERIMENT=loopvar
- id: "dbg-go"
goos:
- linux
goarch:
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
GO ?= go
GORELEASER ?= goreleaser
output ?= dbg-go
TEST_FLAGS ?= -v -race -tags=test_all
DRIVERKIT_VERSION=v0.15.0
Expand All @@ -19,6 +20,10 @@ clean:
test:
GOEXPERIMENT=loopvar $(GO) test ${TEST_FLAGS} ./...

.PHONY: release
release: clean
CGO_ENABLED=0 GOEXPERIMENT=loopvar LDFLAGS="${LDFLAGS}" $(GORELEASER) release

.PHONY: bump-driverkit
bump-driverkit:
go get github.com/falcosecurity/driverkit@$(DRIVERKIT_VER)
Expand Down

0 comments on commit 3fd73cb

Please sign in to comment.