29 lines
604 B
YAML
29 lines
604 B
YAML
|
name: default
|
||
|
kind: pipeline
|
||
|
type: docker
|
||
|
|
||
|
steps:
|
||
|
- name: fetch tags
|
||
|
image: alpine/git
|
||
|
commands:
|
||
|
- git fetch --tags
|
||
|
when:
|
||
|
event:
|
||
|
- tag
|
||
|
|
||
|
- name: build
|
||
|
image: golang:1.17-alpine
|
||
|
commands:
|
||
|
- go build -v ./...
|
||
|
|
||
|
- name: release
|
||
|
image: goreleaser/goreleaser
|
||
|
environment:
|
||
|
GITHUB_TOKEN:
|
||
|
from_secret: github_token
|
||
|
commands:
|
||
|
- go install github.com/git-chglog/git-chglog/cmd/git-chglog@latest
|
||
|
- goreleaser release --clean --release-notes <(git-chglog -t .chglog/RELEASE_CHANGELOG.tpl.md)
|
||
|
when:
|
||
|
event:
|
||
|
- tag
|