From e94be9b302a7248fc87366672bc1a934db46bcd7 Mon Sep 17 00:00:00 2001 From: Kevin Wan Date: Sun, 1 Sep 2024 16:02:49 +0800 Subject: [PATCH] chore: update go version for building goctl releases (#4346) --- .github/workflows/release.yaml | 4 +++- tools/goctl/util/ctx/gomod_test.go | 18 +++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ff55c6eb6f09..50d77a43fc9c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,10 +19,12 @@ jobs: - uses: actions/checkout@v4 - uses: zeromicro/go-zero-release-action@master with: + go-version-file: go.mod + check-latest: true + cache: true github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} - goversion: "https://dl.google.com/go/go1.19.13.linux-amd64.tar.gz" project_path: "tools/goctl" binary_name: "goctl" extra_files: tools/goctl/readme.md tools/goctl/readme-cn.md \ No newline at end of file diff --git a/tools/goctl/util/ctx/gomod_test.go b/tools/goctl/util/ctx/gomod_test.go index 393674221bc2..2859f4eb12b1 100644 --- a/tools/goctl/util/ctx/gomod_test.go +++ b/tools/goctl/util/ctx/gomod_test.go @@ -81,13 +81,13 @@ func Test_getRealModule(t *testing.T) { "Path":"foo", "Dir":"/home/foo", "GoMod":"/home/foo/go.mod", - "GoVersion":"go1.19" + "GoVersion":"go1.20" } { "Path":"bar", "Dir":"/home/bar", "GoMod":"/home/bar/go.mod", - "GoVersion":"go1.19" + "GoVersion":"go1.20" }`, nil }, }, @@ -95,7 +95,7 @@ func Test_getRealModule(t *testing.T) { Path: "bar", Dir: "/home/bar", GoMod: "/home/bar/go.mod", - GoVersion: "go1.19", + GoVersion: "go1.20", }, }, } @@ -143,26 +143,26 @@ func TestDecodePackages(t *testing.T) { "Path":"foo", "Dir":"/home/foo", "GoMod":"/home/foo/go.mod", - "GoVersion":"go1.19" + "GoVersion":"go1.20" } { "Path":"bar", "Dir":"/home/bar", "GoMod":"/home/bar/go.mod", - "GoVersion":"go1.19" + "GoVersion":"go1.20" }`), want: []Module{ { Path: "foo", Dir: "/home/foo", GoMod: "/home/foo/go.mod", - GoVersion: "go1.19", + GoVersion: "go1.20", }, { Path: "bar", Dir: "/home/bar", GoMod: "/home/bar/go.mod", - GoVersion: "go1.19", + GoVersion: "go1.20", }, }, }, @@ -173,14 +173,14 @@ func TestDecodePackages(t *testing.T) { "Path":"foo", "Dir":"/home/foo", "GoMod":"/home/foo/go.mod", - "GoVersion":"go1.19" + "GoVersion":"go1.20" }`), want: []Module{ { Path: "foo", Dir: "/home/foo", GoMod: "/home/foo/go.mod", - GoVersion: "go1.19", + GoVersion: "go1.20", }, }, },