From dfe05bbe50c20198125fec039d737e7c34b9869b Mon Sep 17 00:00:00 2001 From: LiZhenCheng9527 Date: Thu, 10 Oct 2024 21:11:32 +0800 Subject: [PATCH] fix by comments Signed-off-by: LiZhenCheng9527 --- .github/workflows/release.yml | 11 ++++++----- Makefile | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 23c8b45b9..9880cea46 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,10 @@ +name: Build Release + on: release: types: - published -name: Build Release + permissions: contents: read jobs: @@ -14,6 +16,7 @@ jobs: strategy: fail-fast: false matrix: + go-version: [ '1.23' ] target: - kmeshctl os: @@ -27,15 +30,14 @@ jobs: - name: Setup go uses: actions/setup-go@v4.0.0 with: - go-version-file: go.mod + go-version: ${{ matrix.go-version }} - name: Making and packaging env: GOOS: ${{ matrix.os }} GOARCH: ${{ matrix.arch }} - run: make build-kmeshctl OUT=kmeshctl-${{ matrix.os }}-${{ matrix.arch }} + run: make kmeshctl OUT=kmeshctl-${{ matrix.os }}-${{ matrix.arch }} - name: Uploading kmeshctl assets - if: ${{ !env.ACT }} uses: softprops/action-gh-release@v2 with: files: | @@ -53,7 +55,6 @@ jobs: VERSION: ${{ github.ref_name }} run: make helm-package CHART_VERSION=${{ github.ref_name }} - name: Uploading kmesh helm package - if: ${{ !env.ACT }} uses: softprops/action-gh-release@v2 with: files: | diff --git a/Makefile b/Makefile index ce42e6afc..ea67d2ba0 100644 --- a/Makefile +++ b/Makefile @@ -101,8 +101,8 @@ all: $(GO) build -ldflags $(LDFLAGS) -o $(APPS4) $(GOFLAGS) ./ctl/main.go) OUT ?= kmeshctl -.PHONY: build-kmeshctl -build-kmeshctl: +.PHONY: kmeshctl +kmeshctl: $(call printlog, BUILD, $(APPS4)) $(QUIET) (export PKG_CONFIG_PATH=$(PKG_CONFIG_PATH):$(ROOT_DIR)mk; \ $(GO) build -o $(OUT) $(GOFLAGS) ./ctl/main.go)