wg-quicker/.drone.yml
Marvin Preuss 0f3bd2acf5
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is failing
ci: using go mod managed tools in drone
2022-01-07 20:21:30 +01:00

104 lines
1.6 KiB
YAML

---
kind: pipeline
type: docker
name: default
golang-image: &golang-image golang:1.17-alpine
gobin-volume: &gobin-volume
name: gobin
path: /go/bin
usr-volume: &usr-volume
name: usr
path: /usr
deps-command: &deps-command apk add build-base git
steps:
- name: tags
image: alpine/git
commands:
- git fetch --tags
- name: submodules
image: alpine/git
commands:
- git submodule init
- git submodule update
depends_on:
- tags
- name: install-tools
image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
commands:
- *deps-command
- make install-tools
- name: lint
image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
commands:
- make lint
depends_on:
- tags
- submodules
- install-tools
- name: test
image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
commands:
- make test
depends_on:
- install-tools
- tags
- lint
- submodules
- name: build
image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
commands:
- make build
depends_on:
- lint
- test
when:
event:
exclude:
- tag
- name: release
image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
environment:
GITHUB_TOKEN:
from_secret: github_token
commands:
- goreleaser release --rm-dist --parallelism=1
depends_on:
- lint
- test
when:
event:
- tag
volumes:
- name: gobin
temp: {}
- name: usr
temp: {}