From db0ae72b17d7f9b888b05745d4582cb11f345cc0 Mon Sep 17 00:00:00 2001 From: Ping Yu Date: Mon, 13 May 2024 09:46:56 +0800 Subject: [PATCH] build arm64 artifact (#406) Signed-off-by: Ping Yu --- .github/workflows/release_version.yml | 8 +++++++- cdc/Makefile | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_version.yml b/.github/workflows/release_version.yml index 307959a1..906637c9 100644 --- a/.github/workflows/release_version.yml +++ b/.github/workflows/release_version.yml @@ -14,6 +14,9 @@ on: description: git ref required: true +env: + GO_VERSION: 1.21.4 + jobs: release: runs-on: ubuntu-latest @@ -29,13 +32,14 @@ jobs: - "linux" arch: - "amd64" + - "arm64" env: working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }} steps: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.19.6 + go-version: '${{ env.GO_VERSION }}' id: go - name: Check out code into the Go module directory @@ -70,6 +74,8 @@ jobs: run: | export GOPATH=${GITHUB_WORKSPACE}/go export PATH=$PATH:$GOPATH/bin + export GOOS=${{ matrix.os }} + export GOARCH=${{ matrix.arch }} if [ ! -z ${{ steps.check_staging.outputs.STAGING }} ]; then export REL_VER=${{ steps.check_staging.outputs.STAGING }}+staging else diff --git a/cdc/Makefile b/cdc/Makefile index 387531f4..91420470 100644 --- a/cdc/Makefile +++ b/cdc/Makefile @@ -21,7 +21,7 @@ endif BUILD_FLAG := -buildvcs=false -GOBUILD := CGO_ENABLED=0 $(GO) build $(BUILD_FLAG) -trimpath $(GOVENDORFLAG) +GOBUILD := CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) $(GO) build $(BUILD_FLAG) -trimpath $(GOVENDORFLAG) GOBUILD_DEBUG := CGO_ENABLED=0 $(GO) build $(BUILD_FLAG) -gcflags "all=-N -l" $(GOVENDORFLAG) GOBUILDNOVENDOR := CGO_ENABLED=0 $(GO) build $(BUILD_FLAG) -trimpath GOTEST := CGO_ENABLED=1 $(GO) test -p $(P) --race