diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index b3440b6..afe93d0 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -13,14 +13,15 @@ jobs: runs-on: ubuntu-latest steps: + - name: Check out code + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - name: Set up Go uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: - go-version: ^1.19 - id: go + go-version-file: 'go.mod' - - name: Check out code into the Go module directory - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + id: go - name: Build run: go build -v . diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index c4aec33..e896ca1 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -1,4 +1,4 @@ -name: golangci-lint +name: Lint on: push: tags: @@ -12,13 +12,16 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 + - name: Checkout code + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - name: Set up Go + uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: - go-version: 1.19 - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + go-version-file: 'go.mod' - name: golangci-lint uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. version: v1.48 args: --timeout=5m --modules-download-mode=mod + skip-pkg-cache: true diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4fe85b1..b66b5ce 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: - go-version: 1.19 + go-version-file: 'go.mod' - name: Run GoReleaser uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0 with: