chore: sync github action

main
sudo pacman -Syu 2023-07-06 10:09:12 +07:00
parent adb5db96ce
commit 38b9670fa1
3 changed files with 25 additions and 17 deletions

View File

@ -4,3 +4,7 @@ updates:
directory: "/" directory: "/"
schedule: schedule:
interval: "daily" interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

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:
@ -14,11 +26,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-go@v3 - 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
@ -28,11 +38,9 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest] os: [ubuntu-latest, macos-latest, windows-latest]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-go@v3 - uses: actions/setup-go@v4
with: with:
go-version: "1.20" go-version: "stable"
check-latest: true
cache: true
- run: go build ./cmd/populatedb - run: go build ./cmd/populatedb
golangci-lint: golangci-lint:
name: golangci-lint name: golangci-lint
@ -41,11 +49,9 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: actions/setup-go@v3 - 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

@ -15,12 +15,10 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: actions/setup-go@v3 - uses: actions/setup-go@v4
with: with:
go-version: "1.20" go-version: "stable"
check-latest: true - uses: goreleaser/goreleaser-action@v4
cache: true
- uses: goreleaser/goreleaser-action@v2
with: with:
distribution: goreleaser distribution: goreleaser
version: latest version: latest