Skip to content

Commit

Permalink
Chore: actions split lint and release
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamacro committed Oct 11, 2021
1 parent f1cf7e9 commit a1c2478
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -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 ./...
10 changes: 3 additions & 7 deletions .github/workflows/go.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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/')
Expand Down

0 comments on commit a1c2478

Please sign in to comment.