From bd863623a23722faaca14d3b7167949c123facee Mon Sep 17 00:00:00 2001 From: MudassarTariq Date: Wed, 11 Nov 2026 16:53:33 +0500 Subject: [PATCH] ci: build and test with Go 1.26.11 and 1.27.4 GO-2026-6859 (net/http, published 2026-11-11) affects Go 1.26.10 and 1.27.3 and is fixed in Go 1.26.11 and 1.27.4. govulncheck fails on the old pins, so the next CI run would fail. This moves every pin to the fixed releases. - go.mod, checks.yml and release.yml: Go 1.26.11 (matrix also 1.27.4) - build-release.sh: refuses Go older than 1.26.11 / 1.27.4; release_test.go cases moved up to match - README requirements line Checked locally on Go 1.26.11: go vet, go test ./... and govulncheck v1.9.0 (no vulnerabilities). --- .github/workflows/checks.yml | 6 +++--- .github/workflows/release.yml | 2 +- README.md | 2 +- build-release.sh | 4 ++-- cmd/release_test.go | 6 +++--- go.mod | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index bb20d78..de28dd0 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -15,10 +15,10 @@ jobs: strategy: matrix: os: [ubuntu-24.04, macos-15-intel, windows-2025] - go: ["1.26.10"] + go: ["1.26.11"] include: - os: ubuntu-24.04 - go: "1.27.3" + go: "1.27.4" defaults: run: shell: bash @@ -64,7 +64,7 @@ jobs: persist-credentials: false - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 with: - go-version: "1.26.10" + go-version: "1.26.11" - run: go install golang.org/x/vuln/cmd/govulncheck@v1.9.0 - run: bash build-release.sh - name: Check the Linux archive diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c0b3eb..1975e9a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: run: test -s ".github/release-notes/$GITHUB_REF_NAME.md" - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 with: - go-version: "1.26.10" + go-version: "1.26.11" - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6 with: node-version: "24.22.1" diff --git a/README.md b/README.md index d08196f..56ea12e 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ Based on: ## Requirements -- Go 1.26.10 or Go 1.27.3, or a newer patched stable version (only for building from source) +- Go 1.26.11 or Go 1.27.4, or a newer patched stable version (only for building from source) - API Key from [IPGeolocation.io](https://ipgeolocation.io) ## Installation diff --git a/build-release.sh b/build-release.sh index 418bdfb..f14b0e4 100755 --- a/build-release.sh +++ b/build-release.sh @@ -6,8 +6,8 @@ APP_NAME="ipgeolocation" compiler=$(go env GOVERSION) if [[ ! "$compiler" =~ ^go1\.([0-9]+)\.([0-9]+)$ ]] || - (( BASH_REMATCH[1] < 26 || (BASH_REMATCH[1] == 26 && BASH_REMATCH[2] < 10) || (BASH_REMATCH[1] == 27 && BASH_REMATCH[2] < 3) )); then - echo "Use Go 1.26.10, Go 1.27.3, or a newer patched stable version." >&2 + (( BASH_REMATCH[1] < 26 || (BASH_REMATCH[1] == 26 && BASH_REMATCH[2] < 11) || (BASH_REMATCH[1] == 27 && BASH_REMATCH[2] < 4) )); then + echo "Use Go 1.26.11, Go 1.27.4, or a newer patched stable version." >&2 exit 1 fi command -v govulncheck >/dev/null || { echo "Install govulncheck: go install golang.org/x/vuln/cmd/govulncheck@v1.9.0" >&2; exit 1; } diff --git a/cmd/release_test.go b/cmd/release_test.go index e3c313c..e609dea 100644 --- a/cmd/release_test.go +++ b/cmd/release_test.go @@ -18,9 +18,9 @@ func TestReleaseGuardsKeepExistingArtifacts(t *testing.T) { t.Fatal(err) } for _, tc := range []struct{ compiler, tag, want string }{ - {"go1.24.5", "", "Use Go"}, {"go1.26.9", "", "Use Go"}, {"go1.27.2", "", "Use Go"}, - {"go1.28rc1", "", "Use Go"}, {"go1.26.10", "v2.1.0", "Release tag must match"}, - {"go1.26.10", "v2.1.2", "checks-started"}, {"go1.27.3", "", "checks-started"}, {"go1.28.0", "", "checks-started"}, + {"go1.24.5", "", "Use Go"}, {"go1.26.10", "", "Use Go"}, {"go1.27.3", "", "Use Go"}, + {"go1.28rc1", "", "Use Go"}, {"go1.26.11", "v2.1.0", "Release tag must match"}, + {"go1.26.11", "v2.1.2", "checks-started"}, {"go1.27.4", "", "checks-started"}, {"go1.28.0", "", "checks-started"}, } { t.Run(tc.compiler+tc.tag, func(t *testing.T) { dir := t.TempDir() diff --git a/go.mod b/go.mod index 440db79..cb47ab5 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/IPGeolocation/cli/v2 -go 1.26.10 +go 1.26.11 require ( github.com/spf13/cobra v1.9.1