From b971cf9c04cd17ff83c1414a204a89b089e80b96 Mon Sep 17 00:00:00 2001 From: Ping Yu Date: Sun, 12 May 2024 17:55:45 +0800 Subject: [PATCH] build arm64 artifact 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