Skip to content

Commit 2f1e518

Browse files
committed
add a Makefile for building and releasing
1 parent ae172c0 commit 2f1e518

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.idea/
22
tmp/
3+
build/

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
build/wip-%: main.go go.mod
2+
GOOS=$(word 1,$(subst -, ,$(basename $*))) \
3+
GOARCH=$(word 2,$(subst -, ,$(basename $*))) \
4+
go build -o $@ ./...
5+
6+
.PHONY: release
7+
release: build/wip-linux-amd64 build/wip-linux-arm64 build/wip-darwin-amd64 build/wip-darwin-arm64
8+
gh release create v$(shell build/wip-$(shell go env GOOS)-$(shell go env GOARCH) version) --draft --generate-notes $^

0 commit comments

Comments
 (0)