chore: sync github action

main
sudo pacman -Syu 2023-07-01 00:57:22 +07:00
parent 39cd5e1c8e
commit 27061ddff8
2 changed files with 16 additions and 12 deletions

View File

@ -4,9 +4,21 @@ on:
push: push:
branches: branches:
- main - main
paths:
- "**.go"
- "go.mod"
- "go.sum"
pull_request: pull_request:
branches: branches:
- main - main
paths:
- "**.go"
- "go.mod"
- "go.sum"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
test: test:
@ -16,9 +28,7 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-go@v4 - uses: actions/setup-go@v4
with: with:
go-version: "1.20" go-version: "stable"
check-latest: true
cache: true
- run: go test -race -failfast ./... - run: go test -race -failfast ./...
build: build:
name: Build name: Build
@ -30,9 +40,7 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-go@v4 - uses: actions/setup-go@v4
with: with:
go-version: "1.20" go-version: "stable"
check-latest: true
cache: true
- run: go build ./cmd/gofimports - run: go build ./cmd/gofimports
golangci-lint: golangci-lint:
name: golangci-lint name: golangci-lint
@ -43,9 +51,7 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- uses: actions/setup-go@v4 - uses: actions/setup-go@v4
with: with:
go-version: "1.20" go-version: "stable"
check-latest: true
cache: true
- uses: golangci/golangci-lint-action@v3 - uses: golangci/golangci-lint-action@v3
with: with:
version: latest version: latest

View File

@ -17,9 +17,7 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- uses: actions/setup-go@v4 - uses: actions/setup-go@v4
with: with:
go-version: "1.20" go-version: "stable"
check-latest: true
cache: true
- uses: goreleaser/goreleaser-action@v4 - uses: goreleaser/goreleaser-action@v4
with: with:
distribution: goreleaser distribution: goreleaser