From eb20b435c6859211ea268de4445f4f8dfc011fc6 Mon Sep 17 00:00:00 2001 From: Anton Date: Wed, 29 Dec 2021 15:33:40 +0300 Subject: [PATCH 1/4] add workflow --- .github/workflows/release-assets.yml | 76 ++++++++++++++++++++++++++++ Makefile | 39 ++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 .github/workflows/release-assets.yml create mode 100644 Makefile diff --git a/.github/workflows/release-assets.yml b/.github/workflows/release-assets.yml new file mode 100644 index 0000000..4da9909 --- /dev/null +++ b/.github/workflows/release-assets.yml @@ -0,0 +1,76 @@ +# This script is provided by github.com/bool64/dev. + +# This script uploads application binaries as GitHub release assets. +name: release-assets +on: + release: + types: + - created +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + build: + name: Upload Release Assets + strategy: + matrix: + go-version: [ 1.17.x ] + runs-on: ubuntu-latest + steps: + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v2 + - name: Build artifacts + run: | + make release-assets + - name: Upload linux_amd64.tar.gz + if: hashFiles('linux_amd64.tar.gz') != '' + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./linux_amd64.tar.gz + asset_name: linux_amd64.tar.gz + asset_content_type: application/tar+gzip + - name: Upload linux_arm64.tar.gz + if: hashFiles('linux_arm64.tar.gz') != '' + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./linux_arm64.tar.gz + asset_name: linux_arm64.tar.gz + asset_content_type: application/tar+gzip + - name: Upload linux_arm.tar.gz + if: hashFiles('linux_arm.tar.gz') != '' + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./linux_arm.tar.gz + asset_name: linux_arm.tar.gz + asset_content_type: application/tar+gzip + - name: Upload darwin_amd64.tar.gz + if: hashFiles('darwin_amd64.tar.gz') != '' + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./darwin_amd64.tar.gz + asset_name: darwin_amd64.tar.gz + asset_content_type: application/tar+gzip + - name: Upload darwin_arm64.tar.gz + if: hashFiles('darwin_arm64.tar.gz') != '' + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./darwin_arm64.tar.gz + asset_name: darwin_arm64.tar.gz + asset_content_type: application/tar+gzip + - name: Upload windows_amd64.zip + if: hashFiles('windows_amd64.zip') != '' + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./windows_amd64.zip + asset_name: windows_amd64.zip + asset_content_type: application/zip diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f6e4e1c --- /dev/null +++ b/Makefile @@ -0,0 +1,39 @@ +export CGO_ENABLED = 0 +BUILD_LDFLAGS="-s -w" + +#GOLANGCI_LINT_VERSION := "v1.40.1" # Optional configuration to pinpoint golangci-lint version. + +# The head of Makefile determines location of dev-go to include standard targets. +GO ?= go +export GO111MODULE = on + +ifneq "$(GOFLAGS)" "" + $(info GOFLAGS: ${GOFLAGS}) +endif + +ifneq "$(wildcard ./vendor )" "" + $(info Using vendor) + modVendor = -mod=vendor + ifeq (,$(findstring -mod,$(GOFLAGS))) + export GOFLAGS := ${GOFLAGS} ${modVendor} + endif + ifneq "$(wildcard ./vendor/github.com/bool64/dev)" "" + DEVGO_PATH := ./vendor/github.com/bool64/dev + endif +endif + +ifeq ($(DEVGO_PATH),) + DEVGO_PATH := $(shell GO111MODULE=on $(GO) list ${modVendor} -f '{{.Dir}}' -m github.com/bool64/dev) + ifeq ($(DEVGO_PATH),) + $(info Module github.com/bool64/dev not found, downloading.) + DEVGO_PATH := $(shell export GO111MODULE=on && $(GO) mod tidy && $(GO) list -f '{{.Dir}}' -m github.com/bool64/dev) + endif +endif + +-include $(DEVGO_PATH)/makefiles/main.mk +-include $(DEVGO_PATH)/makefiles/lint.mk +-include $(DEVGO_PATH)/makefiles/release-assets.mk +-include $(DEVGO_PATH)/makefiles/build.mk +-include $(DEVGO_PATH)/makefiles/reset-ci.mk + +# Add your custom targets here. \ No newline at end of file From 70d4d252d57bd7d0141affeaac61005eb86457fa Mon Sep 17 00:00:00 2001 From: Anton Date: Wed, 29 Dec 2021 15:47:48 +0300 Subject: [PATCH 2/4] release assets --- Makefile | 8 +++----- release-assets.mk | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 release-assets.mk diff --git a/Makefile b/Makefile index f6e4e1c..c1c6351 100644 --- a/Makefile +++ b/Makefile @@ -30,10 +30,8 @@ ifeq ($(DEVGO_PATH),) endif endif --include $(DEVGO_PATH)/makefiles/main.mk --include $(DEVGO_PATH)/makefiles/lint.mk --include $(DEVGO_PATH)/makefiles/release-assets.mk --include $(DEVGO_PATH)/makefiles/build.mk --include $(DEVGO_PATH)/makefiles/reset-ci.mk + +-include ./release-assets.mk + # Add your custom targets here. \ No newline at end of file diff --git a/release-assets.mk b/release-assets.mk new file mode 100644 index 0000000..7596c72 --- /dev/null +++ b/release-assets.mk @@ -0,0 +1,26 @@ +GO ?= go + +# Override in app Makefile to add custom ldflags, example BUILD_LDFLAGS="-s -w" +BUILD_LDFLAGS ?= "" + +# Override in app Makefile to control build target, example BUILD_PKG=./cmd/my-app +BUILD_PKG ?= . + +# Override in app Makefile to control build artifact destination. +BUILD_DIR ?= ./bin + +export CGO_ENABLED ?= 0 + +RELEASE_TARGETS ?= darwin/amd64 darwin/arm64 linux/amd64 linux/arm64 linux/arm32 windows/amd64 + +## Build and compress binaries for release assets. +release-assets: + @echo "Release targets: $(RELEASE_TARGETS)" + @[[ $(RELEASE_TARGETS) == *"darwin/amd64"* ]] && (echo "Building Darwin AMD64 binary" && GOOS=darwin GOARCH=amd64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../darwin_amd64.tar.gz * && rm *) || : + @[[ $(RELEASE_TARGETS) == *"darwin/arm64"* ]] && (echo "Building Darwin ARM64 binary" && GOOS=darwin GOARCH=arm64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../darwin_arm64.tar.gz * && rm *) || : + @[[ $(RELEASE_TARGETS) == *"linux/amd64"* ]] && (echo "Building Linux AMD64 binary" && GOOS=linux GOARCH=amd64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../linux_amd64.tar.gz * && rm *) || : + @[[ $(RELEASE_TARGETS) == *"linux/arm64"* ]] && (echo "Building Linux ARM64 binary" && GOOS=linux GOARCH=arm64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../linux_arm64.tar.gz * && rm *) || : + @[[ $(RELEASE_TARGETS) == *"linux/arm32"* ]] && (echo "Building Linux ARM binary" && GOOS=linux GOARCH=arm $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../linux_arm.tar.gz * && rm *) || : + @[[ $(RELEASE_TARGETS) == *"windows/amd64"* ]] && (echo "Building Windows AMD64 binary" && GOOS=windows GOARCH=amd64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && zip -9 -j ../windows_amd64.zip * && rm *) || : + +.PHONY: release-assets \ No newline at end of file From 080611a6f7682a60b5aed1137d45c44169794d06 Mon Sep 17 00:00:00 2001 From: Anton Date: Wed, 29 Dec 2021 15:59:37 +0300 Subject: [PATCH 3/4] release workflow --- .github/workflows/release-assets.yml | 76 ---------------------------- .github/workflows/release.yml | 17 +++++++ Makefile | 47 +++++++---------- release-assets.mk | 26 ---------- 4 files changed, 35 insertions(+), 131 deletions(-) delete mode 100644 .github/workflows/release-assets.yml create mode 100644 .github/workflows/release.yml delete mode 100644 release-assets.mk diff --git a/.github/workflows/release-assets.yml b/.github/workflows/release-assets.yml deleted file mode 100644 index 4da9909..0000000 --- a/.github/workflows/release-assets.yml +++ /dev/null @@ -1,76 +0,0 @@ -# This script is provided by github.com/bool64/dev. - -# This script uploads application binaries as GitHub release assets. -name: release-assets -on: - release: - types: - - created -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - -jobs: - build: - name: Upload Release Assets - strategy: - matrix: - go-version: [ 1.17.x ] - runs-on: ubuntu-latest - steps: - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: Checkout code - uses: actions/checkout@v2 - - name: Build artifacts - run: | - make release-assets - - name: Upload linux_amd64.tar.gz - if: hashFiles('linux_amd64.tar.gz') != '' - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./linux_amd64.tar.gz - asset_name: linux_amd64.tar.gz - asset_content_type: application/tar+gzip - - name: Upload linux_arm64.tar.gz - if: hashFiles('linux_arm64.tar.gz') != '' - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./linux_arm64.tar.gz - asset_name: linux_arm64.tar.gz - asset_content_type: application/tar+gzip - - name: Upload linux_arm.tar.gz - if: hashFiles('linux_arm.tar.gz') != '' - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./linux_arm.tar.gz - asset_name: linux_arm.tar.gz - asset_content_type: application/tar+gzip - - name: Upload darwin_amd64.tar.gz - if: hashFiles('darwin_amd64.tar.gz') != '' - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./darwin_amd64.tar.gz - asset_name: darwin_amd64.tar.gz - asset_content_type: application/tar+gzip - - name: Upload darwin_arm64.tar.gz - if: hashFiles('darwin_arm64.tar.gz') != '' - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./darwin_arm64.tar.gz - asset_name: darwin_arm64.tar.gz - asset_content_type: application/tar+gzip - - name: Upload windows_amd64.zip - if: hashFiles('windows_amd64.zip') != '' - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./windows_amd64.zip - asset_name: windows_amd64.zip - asset_content_type: application/zip diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..99b7506 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,17 @@ +# .github/workflows/release.yaml + +on: + release: + types: [created] + +jobs: + release-linux-amd64: + name: release linux/amd64 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: wangyoucao577/go-release-action@v1.22 + with: + github_token: ${{ secrets.RELEASE_TOKEN }} + goos: linux + goarch: amd64 \ No newline at end of file diff --git a/Makefile b/Makefile index c1c6351..7596c72 100644 --- a/Makefile +++ b/Makefile @@ -1,37 +1,26 @@ -export CGO_ENABLED = 0 -BUILD_LDFLAGS="-s -w" - -#GOLANGCI_LINT_VERSION := "v1.40.1" # Optional configuration to pinpoint golangci-lint version. - -# The head of Makefile determines location of dev-go to include standard targets. GO ?= go -export GO111MODULE = on -ifneq "$(GOFLAGS)" "" - $(info GOFLAGS: ${GOFLAGS}) -endif +# Override in app Makefile to add custom ldflags, example BUILD_LDFLAGS="-s -w" +BUILD_LDFLAGS ?= "" -ifneq "$(wildcard ./vendor )" "" - $(info Using vendor) - modVendor = -mod=vendor - ifeq (,$(findstring -mod,$(GOFLAGS))) - export GOFLAGS := ${GOFLAGS} ${modVendor} - endif - ifneq "$(wildcard ./vendor/github.com/bool64/dev)" "" - DEVGO_PATH := ./vendor/github.com/bool64/dev - endif -endif +# Override in app Makefile to control build target, example BUILD_PKG=./cmd/my-app +BUILD_PKG ?= . -ifeq ($(DEVGO_PATH),) - DEVGO_PATH := $(shell GO111MODULE=on $(GO) list ${modVendor} -f '{{.Dir}}' -m github.com/bool64/dev) - ifeq ($(DEVGO_PATH),) - $(info Module github.com/bool64/dev not found, downloading.) - DEVGO_PATH := $(shell export GO111MODULE=on && $(GO) mod tidy && $(GO) list -f '{{.Dir}}' -m github.com/bool64/dev) - endif -endif +# Override in app Makefile to control build artifact destination. +BUILD_DIR ?= ./bin +export CGO_ENABLED ?= 0 --include ./release-assets.mk +RELEASE_TARGETS ?= darwin/amd64 darwin/arm64 linux/amd64 linux/arm64 linux/arm32 windows/amd64 +## Build and compress binaries for release assets. +release-assets: + @echo "Release targets: $(RELEASE_TARGETS)" + @[[ $(RELEASE_TARGETS) == *"darwin/amd64"* ]] && (echo "Building Darwin AMD64 binary" && GOOS=darwin GOARCH=amd64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../darwin_amd64.tar.gz * && rm *) || : + @[[ $(RELEASE_TARGETS) == *"darwin/arm64"* ]] && (echo "Building Darwin ARM64 binary" && GOOS=darwin GOARCH=arm64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../darwin_arm64.tar.gz * && rm *) || : + @[[ $(RELEASE_TARGETS) == *"linux/amd64"* ]] && (echo "Building Linux AMD64 binary" && GOOS=linux GOARCH=amd64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../linux_amd64.tar.gz * && rm *) || : + @[[ $(RELEASE_TARGETS) == *"linux/arm64"* ]] && (echo "Building Linux ARM64 binary" && GOOS=linux GOARCH=arm64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../linux_arm64.tar.gz * && rm *) || : + @[[ $(RELEASE_TARGETS) == *"linux/arm32"* ]] && (echo "Building Linux ARM binary" && GOOS=linux GOARCH=arm $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../linux_arm.tar.gz * && rm *) || : + @[[ $(RELEASE_TARGETS) == *"windows/amd64"* ]] && (echo "Building Windows AMD64 binary" && GOOS=windows GOARCH=amd64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && zip -9 -j ../windows_amd64.zip * && rm *) || : -# Add your custom targets here. \ No newline at end of file +.PHONY: release-assets \ No newline at end of file diff --git a/release-assets.mk b/release-assets.mk deleted file mode 100644 index 7596c72..0000000 --- a/release-assets.mk +++ /dev/null @@ -1,26 +0,0 @@ -GO ?= go - -# Override in app Makefile to add custom ldflags, example BUILD_LDFLAGS="-s -w" -BUILD_LDFLAGS ?= "" - -# Override in app Makefile to control build target, example BUILD_PKG=./cmd/my-app -BUILD_PKG ?= . - -# Override in app Makefile to control build artifact destination. -BUILD_DIR ?= ./bin - -export CGO_ENABLED ?= 0 - -RELEASE_TARGETS ?= darwin/amd64 darwin/arm64 linux/amd64 linux/arm64 linux/arm32 windows/amd64 - -## Build and compress binaries for release assets. -release-assets: - @echo "Release targets: $(RELEASE_TARGETS)" - @[[ $(RELEASE_TARGETS) == *"darwin/amd64"* ]] && (echo "Building Darwin AMD64 binary" && GOOS=darwin GOARCH=amd64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../darwin_amd64.tar.gz * && rm *) || : - @[[ $(RELEASE_TARGETS) == *"darwin/arm64"* ]] && (echo "Building Darwin ARM64 binary" && GOOS=darwin GOARCH=arm64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../darwin_arm64.tar.gz * && rm *) || : - @[[ $(RELEASE_TARGETS) == *"linux/amd64"* ]] && (echo "Building Linux AMD64 binary" && GOOS=linux GOARCH=amd64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../linux_amd64.tar.gz * && rm *) || : - @[[ $(RELEASE_TARGETS) == *"linux/arm64"* ]] && (echo "Building Linux ARM64 binary" && GOOS=linux GOARCH=arm64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../linux_arm64.tar.gz * && rm *) || : - @[[ $(RELEASE_TARGETS) == *"linux/arm32"* ]] && (echo "Building Linux ARM binary" && GOOS=linux GOARCH=arm $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../linux_arm.tar.gz * && rm *) || : - @[[ $(RELEASE_TARGETS) == *"windows/amd64"* ]] && (echo "Building Windows AMD64 binary" && GOOS=windows GOARCH=amd64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && zip -9 -j ../windows_amd64.zip * && rm *) || : - -.PHONY: release-assets \ No newline at end of file From 2e686dc42538c796e518873011d50dcd1c64d2ee Mon Sep 17 00:00:00 2001 From: Anton Date: Wed, 29 Dec 2021 16:04:10 +0300 Subject: [PATCH 4/4] drop makefile --- Makefile | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 Makefile diff --git a/Makefile b/Makefile deleted file mode 100644 index 7596c72..0000000 --- a/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -GO ?= go - -# Override in app Makefile to add custom ldflags, example BUILD_LDFLAGS="-s -w" -BUILD_LDFLAGS ?= "" - -# Override in app Makefile to control build target, example BUILD_PKG=./cmd/my-app -BUILD_PKG ?= . - -# Override in app Makefile to control build artifact destination. -BUILD_DIR ?= ./bin - -export CGO_ENABLED ?= 0 - -RELEASE_TARGETS ?= darwin/amd64 darwin/arm64 linux/amd64 linux/arm64 linux/arm32 windows/amd64 - -## Build and compress binaries for release assets. -release-assets: - @echo "Release targets: $(RELEASE_TARGETS)" - @[[ $(RELEASE_TARGETS) == *"darwin/amd64"* ]] && (echo "Building Darwin AMD64 binary" && GOOS=darwin GOARCH=amd64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../darwin_amd64.tar.gz * && rm *) || : - @[[ $(RELEASE_TARGETS) == *"darwin/arm64"* ]] && (echo "Building Darwin ARM64 binary" && GOOS=darwin GOARCH=arm64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../darwin_arm64.tar.gz * && rm *) || : - @[[ $(RELEASE_TARGETS) == *"linux/amd64"* ]] && (echo "Building Linux AMD64 binary" && GOOS=linux GOARCH=amd64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../linux_amd64.tar.gz * && rm *) || : - @[[ $(RELEASE_TARGETS) == *"linux/arm64"* ]] && (echo "Building Linux ARM64 binary" && GOOS=linux GOARCH=arm64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../linux_arm64.tar.gz * && rm *) || : - @[[ $(RELEASE_TARGETS) == *"linux/arm32"* ]] && (echo "Building Linux ARM binary" && GOOS=linux GOARCH=arm $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && tar zcvf ../linux_arm.tar.gz * && rm *) || : - @[[ $(RELEASE_TARGETS) == *"windows/amd64"* ]] && (echo "Building Windows AMD64 binary" && GOOS=windows GOARCH=amd64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG) && cd $(BUILD_DIR) && zip -9 -j ../windows_amd64.zip * && rm *) || : - -.PHONY: release-assets \ No newline at end of file