generated from meshery/meshery
-
Notifications
You must be signed in to change notification settings - Fork 15
67 lines (66 loc) · 1.7 KB
/
golangci-lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Linter
on:
push:
branches:
- "master"
paths:
- "cmd/**"
- "internal/**"
pull_request:
branches:
- "master"
paths:
- "cmd/**"
- "internal/**"
workflow_dispatch:
inputs:
logLevel:
description: "Log level"
required: true
default: "warning"
jobs:
golangci:
name: golangci-lint
if: github.repository == 'meshery/helm-kanvas-snapshot'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59
working-directory: cmd/kanvas-snapshot
args: --timeout 10m --verbose
skip-cache: true
build:
name: Build
if: github.repository == 'meshery/helm-kanvas-snapshot'
runs-on: macos-latest
needs: [golangci]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Setup Cache
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: goreleaser WITHOUT tag
uses: goreleaser/goreleaser-action@v5
if: success() && startsWith(github.ref, 'refs/tags/') == false
env:
RELEASE_CHANNEL: "edge"
with:
version: latest
args: release --snapshot --skip publish --clean -f .github/.goreleaser.yml