wg-quicker/.drone.yml

77 lines
1.4 KiB
YAML
Raw Normal View History

2021-01-20 15:24:38 +01:00
---
kind: pipeline
name: default
steps:
2021-01-22 11:27:22 +01:00
- name: tags
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-01-20 15:24:38 +01:00
2021-01-21 12:24:32 +01:00
- name: go-bindata
image: golang:latest
commands:
- (cd /tmp; go get -u github.com/go-bindata/go-bindata/...)
- go-bindata -pkg assets -o assets/bindata.go -nomemcopy /bin/true
2021-01-20 15:24:38 +01:00
- name: lint
image: golangci/golangci-lint:latest
commands:
- make lint
2021-01-21 12:24:32 +01:00
depends_on:
- go-bindata
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:
- go-bindata
- name: clean
image: golang:latest
commands:
- make clean
- git checkout -- .
depends_on:
- lint
- test
2021-01-20 15:24:38 +01:00
- name: build
image: goreleaser/goreleaser:latest
commands:
2021-01-21 12:24:32 +01:00
- (cd /tmp; go get -u github.com/go-bindata/go-bindata/...)
2021-01-20 15:24:38 +01:00
- make build
depends_on:
2021-01-22 11:57:43 +01:00
- submodules
2021-01-21 12:24:32 +01:00
- clean
2021-01-20 15:24:38 +01:00
---
kind: pipeline
name: deploy
steps:
2021-01-20 15:24:38 +01:00
- name: release
image: goreleaser/goreleaser:latest
environment:
GITEA_TOKEN:
from_secret: gitea_token
commands:
2021-01-21 12:24:32 +01:00
- (cd /tmp; go get -u github.com/go-bindata/go-bindata/...)
- goreleaser release --rm-dist --parallelism=1
depends_on:
- default
trigger:
event:
- promote
target:
- production