diff --git a/.github/workflows/post-release.yaml b/.github/workflows/post-release.yaml index 9641d2c00758a..df1c33bb64798 100644 --- a/.github/workflows/post-release.yaml +++ b/.github/workflows/post-release.yaml @@ -94,8 +94,8 @@ jobs: git config --global user.email "noreply@github.com" git config --global user.name "GitHub" - # get Go version from go.mod - GO_VERSION=$(go mod edit -json | jq -r .Go) + # get Go version from go.mod (preferring the toolchain directive if it's present) + GO_VERSION=$(go mod edit -json | jq -r 'if has("Toolchain") then .Toolchain | sub("go"; "") else .Go end') # update versions in docs/config.json # for docker images replace version number after :