Skip to content

Commit

Permalink
add a Makefile for building and releasing
Browse files Browse the repository at this point in the history
  • Loading branch information
m25n committed Oct 18, 2023
1 parent ae172c0 commit 2f1e518
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea/
tmp/
build/
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
build/wip-%: main.go go.mod
GOOS=$(word 1,$(subst -, ,$(basename $*))) \
GOARCH=$(word 2,$(subst -, ,$(basename $*))) \
go build -o $@ ./...

.PHONY: release
release: build/wip-linux-amd64 build/wip-linux-arm64 build/wip-darwin-amd64 build/wip-darwin-arm64
gh release create v$(shell build/wip-$(shell go env GOOS)-$(shell go env GOARCH) version) --draft --generate-notes $^

0 comments on commit 2f1e518

Please sign in to comment.