distea/.drone.yml

71 lines
1.1 KiB
YAML

---
kind: pipeline
type: docker
name: compliance
platform:
os: linux
arch: amd64
trigger:
event:
- pull_request
steps:
- name: check
pull: always
image: golang:1.18
environment:
GOPROXY: https://goproxy.io
commands:
- go test -race -v ./...
- name: build
pull: always
image: goreleaser/goreleaser
environment:
GOPROXY: https://goproxy.io
commands:
- goreleaser build --snapshot
---
kind: pipeline
type: docker
name: build-main
platform:
os: linux
arch: amd64
trigger:
branch:
- main
event:
- push
steps:
- name: build
pull: always
image: goreleaser/goreleaser
environment:
GOPROXY: https://goproxy.io
commands:
- goreleaser build --snapshot
---
kind: pipeline
type: docker
name: release
platform:
os: linux
arch: amd64
trigger:
event:
- tag
steps:
- name: fetch
image: alpine/git
commands:
- git fetch --tags
- name: release
pull: always
image: goreleaser/goreleaser
environment:
GOPROXY: https://goproxy.io
GITEA_TOKEN:
from_secret: gitea_token
commands:
- goreleaser release