2021-01-20 15:24:38 +01:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
2021-01-22 11:27:22 +01:00
|
|
|
- name: tags
|
2021-01-22 11:05:17 +01:00
|
|
|
image: alpine/git
|
2021-01-20 15:24:38 +01:00
|
|
|
commands:
|
|
|
|
- git fetch --tags
|
2021-01-22 11:27:22 +01:00
|
|
|
|
|
|
|
- name: submodules
|
|
|
|
image: alpine/git
|
|
|
|
commands:
|
|
|
|
- git submodule init
|
2021-01-22 11:57:43 +01:00
|
|
|
- git submodule update
|
2021-04-16 14:26:44 +02:00
|
|
|
depends_on:
|
|
|
|
- tags
|
2021-01-21 12:24:32 +01:00
|
|
|
|
2021-01-20 15:24:38 +01:00
|
|
|
- name: lint
|
2021-05-11 15:10:13 +02:00
|
|
|
image: golangci/golangci-lint:v1.39.0
|
2021-01-20 15:24:38 +01:00
|
|
|
commands:
|
|
|
|
- make lint
|
2021-01-21 12:24:32 +01:00
|
|
|
depends_on:
|
2021-04-16 14:26:44 +02:00
|
|
|
- submodules
|
2021-01-20 15:24:38 +01:00
|
|
|
|
|
|
|
- name: test
|
|
|
|
image: golang:latest
|
|
|
|
commands:
|
2021-01-21 12:24:32 +01:00
|
|
|
- make test
|
|
|
|
depends_on:
|
2021-04-16 14:25:25 +02:00
|
|
|
- submodules
|
2021-01-20 15:24:38 +01:00
|
|
|
|
|
|
|
- name: build
|
2021-04-16 14:25:25 +02:00
|
|
|
image: goreleaser/goreleaser:v0.162.0
|
2021-01-20 15:24:38 +01:00
|
|
|
commands:
|
|
|
|
- make build
|
|
|
|
depends_on:
|
2021-04-16 14:25:25 +02:00
|
|
|
- lint
|
|
|
|
- test
|
2021-01-25 09:18:46 +01:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
exclude:
|
2021-01-27 11:07:21 +01:00
|
|
|
- tag
|
2021-01-20 15:24:38 +01:00
|
|
|
|
|
|
|
- name: release
|
2021-04-16 14:25:25 +02:00
|
|
|
image: goreleaser/goreleaser:v0.162.0
|
2021-01-20 15:24:38 +01:00
|
|
|
environment:
|
2021-01-27 10:15:34 +01:00
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2021-01-20 15:24:38 +01:00
|
|
|
commands:
|
2021-01-21 12:24:32 +01:00
|
|
|
- goreleaser release --rm-dist --parallelism=1
|
2021-01-25 09:18:46 +01:00
|
|
|
depends_on:
|
2021-04-16 14:25:25 +02:00
|
|
|
- lint
|
|
|
|
- test
|
2021-01-25 09:18:46 +01:00
|
|
|
when:
|
|
|
|
event:
|
2021-01-27 11:07:21 +01:00
|
|
|
- tag
|