go-ddns-client/.drone.yml

44 lines
840 B
YAML
Raw Normal View History

2019-05-09 08:13:25 +00:00
kind: pipeline
name: build_release
steps:
- name: test and build
image: golang
2019-05-09 08:30:35 +00:00
volumes:
- name: deps
path: /build
2019-05-09 08:13:25 +00:00
commands:
2019-05-09 08:30:35 +00:00
- go test ./...
- go build -o /build/ddns-client -ldflags "-w -s" .
- cp config.default.yml /build/config.yml
2019-05-09 08:55:20 +00:00
- name: pack release
image: alpine
volumes:
- name: deps
path: /build
commands:
- apk add --no-cache zip
- |
cd /build
zip -r release.zip ddns-client config.yml
when:
event: tag
2019-05-09 08:30:35 +00:00
- name: gitea release
image: plugins/gitea-release
volumes:
- name: deps
path: /build
settings:
api_key:
from_secret: gitea_release_key
base_url: 'https://git.trj.tw'
2019-05-09 09:00:57 +00:00
files: /build/release.zip
2019-05-09 08:30:35 +00:00
when:
2019-05-09 08:34:54 +00:00
event: tag
2019-05-09 08:30:35 +00:00
volumes:
- name: deps
temp: {}