Repository: helm/helm
Pull request #30677 (2025-03-17 12:03:25)

chore: Update Golang to v1.24
<!--  Thanks for sending a pull request!  Here are some tips for you:
1. Make sure to read the Contributing Guide before submitting your PR: https://github.com/helm/helm/blob/main/CONTRIBUTING.md
2. If this PR closes another issue, add 'closes #<issue number>' somewhere in the PR summary. GitHub will automatically close that issue when this PR gets merged. Alternatively, adding 'refs #<issue number>' will not close the issue, but help provide the reviewer more context.-->

**What this PR does / why we need it**:

This is needed to update to the latest k8s packages(v1.33.beta.0) as they require Go 1.24

**Special notes for your reviewer**:

**If applicable**:
- [ ] this PR contains user facing changes (the `docs needed` label should be applied if so)
- [ ] this PR contains unit tests
- [x] this PR has been tested for backwards compatibility



Patch:
diff --git a/.github/env b/.github/env
new file mode 100644
index 000000000..b321f6ef7
--- /dev/null
+++ b/.github/env
@@ -0,0 +1,2 @@
+GOLANG_VERSION=1.24
+GOLANGCI_LINT_VERSION=v2.0.2
diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml
index a3f6ba359..7ecbcb95d 100644
--- a/.github/workflows/golangci-lint.yml
+++ b/.github/workflows/golangci-lint.yml
@@ -14,13 +14,14 @@ jobs:
     steps:
       - name: Checkout
         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4.2.2
-
+      - name: Add variables to environment file
+        run: cat ".github/env" >> "$GITHUB_ENV"
       - name: Setup Go
         uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # pin@5.4.0
         with:
-          go-version: '1.23'
+          go-version: '${{ env.GOLANG_VERSION }}'
           check-latest: true
       - name: golangci-lint
         uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd #pin@7.0.0
         with:
-          version: v2.0.2
+          version: ${{ env.GOLANGCI_LINT_VERSION }}
diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml
index b376c7b8e..8d183e244 100644
--- a/.github/workflows/govulncheck.yml
+++ b/.github/workflows/govulncheck.yml
@@ -13,10 +13,12 @@ jobs:
     name: govulncheck
     runs-on: ubuntu-latest
     steps:
+      - name: Add variables to environment file
+        run: cat ".github/env" >> "$GITHUB_ENV"
       - name: Setup Go
         uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # pin@5.4.0
         with:
-          go-version: '1.23'
+          go-version: '${{ env.GOLANG_VERSION }}'
           check-latest: true
       - name: govulncheck
         uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # pin@1.0.4
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 63e5c0e26..38d13a175 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -24,14 +24,15 @@ jobs:
         with:
           fetch-depth: 0
 
+      - name: Add variables to environment file
+        run: cat ".github/env" >> "$GITHUB_ENV"
+
       - name: Setup Go
         uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # pin@5.4.0
         with:
-          go-version: '1.23'
-
+          go-version: '${{ env.GOLANG_VERSION }}'
       - name: Run unit tests
         run: make test-coverage
-
       - name: Build Helm Binaries
         run: |
           set -eu -o pipefail
@@ -80,10 +81,13 @@ jobs:
       - name: Checkout source code
         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4.2.2
 
+      - name: Add variables to environment file
+        run: cat ".github/env" >> "$GITHUB_ENV"
+
       - name: Setup Go
         uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # pin@5.4.0
         with:
-          go-version: '1.23'
+          go-version: '${{ env.GOLANG_VERSION }}'
           check-latest: true
 
       - name: Run unit tests
diff --git a/go.mod b/go.mod
index 2fc57d0bb..c76eea063 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
 module helm.sh/helm/v4
 
-go 1.23.7
+go 1.24.0
 
 require (
 	github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24


Test patch:
diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml
index b654bf4d6..6ed7092dc 100644
--- a/.github/workflows/build-test.yml
+++ b/.github/workflows/build-test.yml
@@ -19,10 +19,12 @@ jobs:
     steps:
       - name: Checkout source code
         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4.2.2
+      - name: Add variables to environment file
+        run: cat ".github/env" >> "$GITHUB_ENV"
       - name: Setup Go
         uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # pin@5.4.0
         with:
-          go-version: '1.23'
+          go-version: '${{ env.GOLANG_VERSION }}'
           check-latest: true
       - name: Test source headers are present
         run: make test-source-headers