From 27061ddff82ce30981a35a3d76a5e5f8185b9594 Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Sat, 1 Jul 2023 00:57:22 +0700 Subject: [PATCH] chore: sync github action --- .github/workflows/go.yml | 24 +++++++++++++++--------- .github/workflows/goreleaser.yml | 4 +--- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index fc04dc4..498821b 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -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,9 +40,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 build ./cmd/gofimports golangci-lint: name: golangci-lint @@ -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.yml b/.github/workflows/goreleaser.yml index bc574ec..940106b 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -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