Chore: actions split lint and release
This commit is contained in:
parent
f1cf7e9269
commit
a1c2478e74
2 changed files with 15 additions and 7 deletions
12
.github/workflows/linter.yml
vendored
Normal file
12
.github/workflows/linter.yml
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
name: Linter
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v2
|
||||
with:
|
||||
version: latest
|
||||
args: --disable-all -E govet -E gofumpt -E megacheck ./...
|
|
@ -1,9 +1,7 @@
|
|||
name: Go
|
||||
on: [push, pull_request]
|
||||
name: Release
|
||||
on: [push]
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get latest go version
|
||||
|
@ -27,11 +25,9 @@ jobs:
|
|||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
|
||||
- name: Get dependencies, run test and static check
|
||||
- name: Get dependencies, run test
|
||||
run: |
|
||||
go test ./...
|
||||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
||||
golangci-lint run --disable-all -E govet -E gofumpt -E megacheck ./...
|
||||
|
||||
- name: Build
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
Loading…
Reference in a new issue