go-ddns-client/.drone.yml

44 lines
840 B
YAML

kind: pipeline
name: build_release
steps:
- name: test and build
image: golang
volumes:
- name: deps
path: /build
commands:
- go test ./...
- go build -o /build/ddns-client -ldflags "-w -s" .
- cp config.default.yml /build/config.yml
- 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
- 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'
files: /build/release.zip
when:
event: tag
volumes:
- name: deps
temp: {}