2020-01-07 12:39:45 +01:00
|
|
|
---
|
|
|
|
kind: pipeline
|
2021-03-03 14:03:18 +01:00
|
|
|
name: default
|
|
|
|
|
2020-01-07 12:39:45 +01:00
|
|
|
steps:
|
2021-03-03 14:03:18 +01:00
|
|
|
- name: tags
|
|
|
|
image: alpine/git
|
2020-01-07 12:39:45 +01:00
|
|
|
commands:
|
2021-03-03 14:03:18 +01:00
|
|
|
- git fetch --tags
|
|
|
|
|
2020-02-12 11:14:56 +01:00
|
|
|
- name: lint
|
2021-03-03 14:03:18 +01:00
|
|
|
image: golangci/golangci-lint:latest
|
2020-01-07 12:39:45 +01:00
|
|
|
commands:
|
2020-02-12 11:14:56 +01:00
|
|
|
- make lint
|
2021-03-03 14:03:18 +01:00
|
|
|
|
|
|
|
- name: test
|
|
|
|
image: golang:latest
|
|
|
|
commands:
|
|
|
|
- make test
|
|
|
|
|
2020-01-07 12:39:45 +01:00
|
|
|
- name: build
|
2021-03-03 14:03:18 +01:00
|
|
|
image: goreleaser/goreleaser:latest
|
2020-01-07 12:39:45 +01:00
|
|
|
commands:
|
2020-02-12 11:14:56 +01:00
|
|
|
- make build
|
2021-03-03 14:03:18 +01:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- tag
|
|
|
|
|
|
|
|
- name: release
|
|
|
|
image: goreleaser/goreleaser:latest
|
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
2020-01-07 12:39:45 +01:00
|
|
|
from_secret: github_token
|
2021-03-03 14:03:18 +01:00
|
|
|
commands:
|
|
|
|
- goreleaser release --rm-dist --parallelism=1
|
2020-01-07 12:39:45 +01:00
|
|
|
when:
|
2021-03-03 14:03:18 +01:00
|
|
|
event:
|
|
|
|
- tag
|