-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.drone.yml
84 lines (76 loc) · 1.6 KB
/
.drone.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Copyright (c) 2017-present SIGHUP s.r.l All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
kind: pipeline
type: docker
name: main
clone:
depth: 1
steps:
- name: license
image: quay.io/sighup/golang:1.21.5
pull: always
environment:
CGO_ENABLED: 0
commands:
- apk add make
- make license-check
- name: lint
image: quay.io/sighup/golang:1.21.5
pull: always
environment:
CGO_ENABLED: 0
commands:
- apk add make
- make lint
when:
event:
- push
- tag
- name: test
image: quay.io/sighup/golang:1.21.5
pull: always
environment:
CGO_ENABLED: 0
commands:
- apk add openvpn
- go test -v ./...
when:
event:
- push
- tag
- name: build
image: ghcr.io/goreleaser/goreleaser:v1.21.2
pull: always
depends_on:
- lint
- test
environment:
CGO_ENABLED: 0
GITHUB_TOKEN:
from_secret: GITHUB_TOKEN
commands:
- goreleaser check
- goreleaser --debug build --skip-validate --clean --snapshot
- name: build-release
image: ghcr.io/goreleaser/goreleaser:v1.21.2
pull: always
depends_on:
- build
environment:
CGO_ENABLED: 0
GITHUB_TOKEN:
from_secret: GITHUB_TOKEN
commands:
- git reset --hard
- git fetch --tags
- goreleaser check
- goreleaser --debug release --clean
when:
ref:
include:
- refs/tags/v**
trigger:
event:
exclude:
- pull_request