diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0b6d3f2..6ef3f33 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,11 +18,14 @@ jobs: - run: go install github.com/tcnksm/ghr@latest + - name: Patch + run: make patch + - name: Build run: | - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o dist/suzu_linux_amd64 cmd/suzu/main.go - CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o dist/suzu_darwin_amd64 cmd/suzu/main.go - CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o dist/suzu_darwin_arm64 cmd/suzu/main.go + GOOS=linux GOARCH=amd64 make release + GOOS=darwin GOARCH=amd64 make release + GOOS=darwin GOARCH=arm64 make release gzip dist/* - name: Release diff --git a/CHANGES.md b/CHANGES.md index b7f0741..eb4e508 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,6 +13,13 @@ ### misc +## 2024.5.1 + +- [FIX] リリース時の build 前に patch をあてるように修正する + - @Hexa +- [ADD] リリース時の build を Makefile にまとめる + - @Hexa + ## 2024.5.0 - [FIX] 高ビットレートの音声データの場合に、解析結果が送られてこない不具合を修正する diff --git a/Makefile b/Makefile index 4a92547..532ebc0 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ .PHONY: all patch test +LIST := $(GOOS) $(GOARCH) +SUFFIX := $(shell printf "_%s" $(LIST)) + all: patch go build -o bin/suzu cmd/suzu/main.go @@ -10,3 +13,10 @@ patch: test: @go test -v --race + +release: patch +ifeq ($(SUFFIX),_) + CGO_ENABLED=0 go build -o dist/suzu cmd/suzu/main.go +else + CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o dist/suzu$(SUFFIX) cmd/suzu/main.go +endif \ No newline at end of file diff --git a/VERSION b/VERSION index 0cf8b76..b150c16 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2024.5.0 +2024.5.1