Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci,makefile): add a new release Makefile target to pass LDFLAGS to goreleaser #25

Merged
merged 1 commit into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading