diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index e79fbf8..f55fbc0 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -12,14 +12,18 @@ jobs: lint: runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup go uses: actions/setup-go@v5 with: - go-version: "^1" - - name: Checkout repository - uses: actions/checkout@v4 + go-version-file: go.mod + check-latest: true - name: Setup golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v4 with: args: --verbose test: @@ -48,7 +52,7 @@ jobs: with: ref: ${{ github.ref }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | ${{ matrix.go-build }} @@ -61,6 +65,6 @@ jobs: go test -v -covermode=atomic -coverprofile=coverage.out - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: flags: ${{ matrix.os }},go-${{ matrix.go }} diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index eeb0cd1..2785f41 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -9,18 +9,22 @@ jobs: goreleaser: runs-on: ubuntu-latest steps: - - name: Checkout + - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up Go + + - name: Setup go uses: actions/setup-go@v5 + with: + go-version-file: go.mod + check-latest: true - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 with: # either 'goreleaser' (default) or 'goreleaser-pro' distribution: goreleaser version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}