2021-04-16 09:23:11 +02:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: tags
|
|
|
|
image: alpine/git
|
|
|
|
commands:
|
|
|
|
- git fetch --tags
|
|
|
|
|
|
|
|
- name: lint
|
|
|
|
image: golangci/golangci-lint:latest
|
|
|
|
commands:
|
2021-05-05 11:23:43 +02:00
|
|
|
- make install-tools
|
2021-04-16 09:23:11 +02:00
|
|
|
- make lint
|
2021-04-16 09:25:41 +02:00
|
|
|
depends_on:
|
|
|
|
- tags
|
2021-04-16 09:23:11 +02:00
|
|
|
|
|
|
|
- name: test
|
|
|
|
image: golang:latest
|
|
|
|
commands:
|
|
|
|
- make test
|
2021-04-16 09:25:41 +02:00
|
|
|
depends_on:
|
|
|
|
- tags
|
2021-04-16 09:23:11 +02:00
|
|
|
|
|
|
|
- name: build
|
|
|
|
image: goreleaser/goreleaser:v0.162.0
|
|
|
|
commands:
|
|
|
|
- make build
|
|
|
|
depends_on:
|
2021-04-16 09:25:41 +02:00
|
|
|
- tags
|
2021-04-16 09:23:11 +02:00
|
|
|
- lint
|
|
|
|
- test
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- tag
|
|
|
|
|
|
|
|
- name: release
|
|
|
|
image: goreleaser/goreleaser:v0.162.0
|
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
|
|
|
commands:
|
|
|
|
- goreleaser release --rm-dist
|
|
|
|
depends_on:
|
2021-04-16 09:25:41 +02:00
|
|
|
- tags
|
2021-04-16 09:23:11 +02:00
|
|
|
- lint
|
|
|
|
- test
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- tag
|