diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4d9781a..438046f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,13 +15,14 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 6 steps: - - uses: actions/setup-go@v5 - with: - go-version: 1.22 - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + check-latest: true - name: Lint uses: golangci/golangci-lint-action@v4 with: @@ -36,16 +37,16 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macOS-latest, windows-latest] - go: [1.22] steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - - name: "Setup Go ${{ matrix.go }}" + - name: "Setup Go" uses: actions/setup-go@v5 with: - go-version: "${{ matrix.go }}" + go-version-file: go.mod + check-latest: true - name: "Setup Go modules cache" uses: "actions/cache@v4" with: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 6a629a0..4c91d63 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -25,6 +25,11 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + # workaround for https://github.com/github/codeql/issues/15647 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + check-latest: true - name: Initialize uses: github/codeql-action/init@v3 with: diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 90ee3c9..e47de99 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -14,12 +14,11 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 # See: https://goreleaser.com/ci/actions/ - - name: Determine Go version from go.mod - run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV - name: Install Go uses: actions/setup-go@v5 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: go.mod + check-latest: true - name: Create release uses: goreleaser/goreleaser-action@v5 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 829a505..a03ed11 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,12 +14,11 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 # See: https://goreleaser.com/ci/actions/ - - name: Determine Go version from go.mod - run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV - name: Install Go uses: actions/setup-go@v5 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: go.mod + check-latest: true - name: Create release uses: goreleaser/goreleaser-action@v5 with: