diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83572e7..ab36d0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,10 +21,18 @@ jobs: with: persist-credentials: false - - name: set up go 1.25 + - name: read go version from go.mod + id: gomod + run: | + version=$(awk '/^go /{split($2, v, "."); print v[1] "." v[2]; exit}' go.mod) + test -n "$version" + echo "version=$version" >> "$GITHUB_OUTPUT" + + - name: set up go uses: actions/setup-go@v6 with: - go-version: "1.25" + go-version: ${{ steps.gomod.outputs.version }} + check-latest: true id: go - name: build and test