-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
48 lines (44 loc) · 1.01 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
kind: pipeline
type: docker
name: default
volumes:
- name: dockersock
temp: {}
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
steps:
- name: lint
image: golang:alpine
environment:
GOLINTCI_VERSION: v1.56.2
CGO_ENABLED: 0
GOOS: linux
commands:
- wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLINTCI_VERSION}
- golangci-lint --version
- golangci-lint run
- name: build-and-publish
image: ghcr.io/goreleaser/goreleaser:v1.24.0
environment:
GITHUB_USERNAME:
from_secret: github-username
GITHUB_TOKEN:
from_secret: github-pat-packages
commands:
- git fetch --tags
- echo $GITHUB_TOKEN | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin
- goreleaser --version
- goreleaser release --clean -f ./.goreleaser.yml
volumes:
- name: dockersock
path: /var/run
when:
ref:
- refs/tags/*
depends_on:
- lint