From 099cec81ad7831c5846092b69fbcf549cd06c82e Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Fri, 30 Jun 2023 15:01:52 +0700 Subject: [PATCH] chore: use go stable --- .github/workflows/go.yaml | 26 ++++++++++++++++---------- .github/workflows/goreleaser.yaml | 4 +--- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index 5b23a4c..e32fe68 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -4,9 +4,21 @@ on: push: branches: - main + paths: + - "**.go" + - "go.mod" + - "go.sum" pull_request: branches: - main + paths: + - "**.go" + - "go.mod" + - "go.sum" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: test: @@ -16,9 +28,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" - check-latest: true - cache: true + go-version: "stable" - run: go test -race -failfast . build: name: Build @@ -30,10 +40,8 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: "1.20" - check-latest: true - cache: true - - run: go build + go-version: "stable" + - run: go build . golangci-lint: name: golangci-lint runs-on: ubuntu-latest @@ -43,9 +51,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-go@v4 with: - go-version: "1.20" - check-latest: true - cache: true + go-version: "stable" - uses: golangci/golangci-lint-action@v3 with: version: latest diff --git a/.github/workflows/goreleaser.yaml b/.github/workflows/goreleaser.yaml index bc574ec..940106b 100644 --- a/.github/workflows/goreleaser.yaml +++ b/.github/workflows/goreleaser.yaml @@ -17,9 +17,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-go@v4 with: - go-version: "1.20" - check-latest: true - cache: true + go-version: "stable" - uses: goreleaser/goreleaser-action@v4 with: distribution: goreleaser