From 92bc28f6319f81eb60b8f8326ff18f2e2b5cabd6 Mon Sep 17 00:00:00 2001 From: CAICAIIs <3360776475@qq.com> Date: Thu, 21 Aug 2025 19:11:20 +0800 Subject: [PATCH 1/5] ci: add Go 1.23 to CI matrices; deps: bump protobuf to v1.36.8 --- .github/workflows/ci.yml | 1 + .github/workflows/golangci-lint.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76f964b..7fb5d59 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,7 @@ jobs: - '1.20' - '1.21' - '1.22' + - '1.23' os: - ubuntu-latest diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index e8802fd..c146e9a 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -21,6 +21,7 @@ jobs: - "1.20" - "1.21" - "1.22" + - "1.23" steps: - uses: actions/setup-go@v5 with: From fe27a8bb6067f3f20c0e3ed0bdf6a8dbc22a8104 Mon Sep 17 00:00:00 2001 From: CAICAIIs <3360776475@qq.com> Date: Thu, 21 Aug 2025 19:20:51 +0800 Subject: [PATCH 2/5] ci: lint only on Go 1.23; run go mod tidy only on 1.23 --- .github/workflows/ci.yml | 2 +- .github/workflows/golangci-lint.yml | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7fb5d59..e19f352 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,7 +80,7 @@ jobs: - name: Verify run: | - go mod tidy + if [[ "${{ matrix.go_version }}" == "1.23" ]]; then go mod tidy; fi make verify - name: Build diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index c146e9a..313cd4d 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -18,9 +18,6 @@ jobs: strategy: matrix: golang: - - "1.20" - - "1.21" - - "1.22" - "1.23" steps: - uses: actions/setup-go@v5 From 2bd85d098276d6f2247d9754cb2551238e165dae Mon Sep 17 00:00:00 2001 From: CAICAIIs <3360776475@qq.com> Date: Thu, 21 Aug 2025 19:23:14 +0800 Subject: [PATCH 3/5] ci: use setup-go cache; deps: switch install step to go mod download; go.mod: set go 1.23 --- .github/workflows/ci.yml | 13 +++---------- go.mod | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e19f352..bf558ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,20 +46,13 @@ jobs: uses: actions/setup-go@v5 with: go-version: ${{ matrix.go_version }} + cache: true id: go - name: Checkout uses: actions/checkout@v4 - - name: Cache dependencies - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + # Built-in caching in setup-go covers module and build caches - name: Merge code into the upstream if: ${{ github.event_name == 'pull_request' }} @@ -74,7 +67,7 @@ jobs: - name: Install dependencies run: | - go get -v -t -d ./... + go mod download # Removed code formatting enforcement to allow custom import style diff --git a/go.mod b/go.mod index 337a829..312f7aa 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/dubbogo/protoc-gen-go-triple/v3 -go 1.20 +go 1.23 require google.golang.org/protobuf v1.34.2 From 79814724098b7abf37b7ffd4c00bde1eb345fe8f Mon Sep 17 00:00:00 2001 From: CAICAIIs <3360776475@qq.com> Date: Thu, 21 Aug 2025 19:25:19 +0800 Subject: [PATCH 4/5] ci: build/test only on Go 1.23; release uses Go 1.23.x --- .github/workflows/ci.yml | 3 --- .github/workflows/protoc-release.yml | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf558ac..7e24d9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,9 +33,6 @@ jobs: strategy: matrix: go_version: - - '1.20' - - '1.21' - - '1.22' - '1.23' os: - ubuntu-latest diff --git a/.github/workflows/protoc-release.yml b/.github/workflows/protoc-release.yml index 13d7fe8..218b0c2 100644 --- a/.github/workflows/protoc-release.yml +++ b/.github/workflows/protoc-release.yml @@ -23,7 +23,9 @@ jobs: uses: actions/checkout@v2 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 + with: + go-version: '1.23.x' - name: Download dependencies run: | From bcae5818d094ac2c0766a55653fc0026840a9e01 Mon Sep 17 00:00:00 2001 From: CAICAIIs <3360776475@qq.com> Date: Thu, 21 Aug 2025 19:30:57 +0800 Subject: [PATCH 5/5] =?UTF-8?q?ci:=20multi-version=20build/test=20(1.20?= =?UTF-8?q?=E2=80=931.23),=20tidy=20on=201.20;=20release=20uses=20Go=201.2?= =?UTF-8?q?0.x;=20go.mod=20set=20go=201.20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 5 ++++- .github/workflows/protoc-release.yml | 2 +- go.mod | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e24d9e..b2757ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,9 @@ jobs: strategy: matrix: go_version: + - '1.20' + - '1.21' + - '1.22' - '1.23' os: - ubuntu-latest @@ -70,7 +73,7 @@ jobs: - name: Verify run: | - if [[ "${{ matrix.go_version }}" == "1.23" ]]; then go mod tidy; fi + if [[ "${{ matrix.go_version }}" == "1.20" ]]; then go mod tidy; fi make verify - name: Build diff --git a/.github/workflows/protoc-release.yml b/.github/workflows/protoc-release.yml index 218b0c2..03d8104 100644 --- a/.github/workflows/protoc-release.yml +++ b/.github/workflows/protoc-release.yml @@ -25,7 +25,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.23.x' + go-version: '1.20.x' - name: Download dependencies run: | diff --git a/go.mod b/go.mod index 312f7aa..337a829 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/dubbogo/protoc-gen-go-triple/v3 -go 1.23 +go 1.20 require google.golang.org/protobuf v1.34.2