add ci file

This commit is contained in:
Jay 2019-05-09 16:30:35 +08:00
parent 4fa99f16bd
commit e5983c3fab
1 changed files with 24 additions and 2 deletions

View File

@ -4,6 +4,28 @@ name: build_release
steps:
- name: test and build
image: golang
volumes:
- name: deps
path: /build
commands:
- go test
- go build
- go test ./...
- go build -o /build/ddns-client -ldflags "-w -s" .
- cp config.default.yml /build/config.yml
- 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/*
when:
branch:
- master
volumes:
- name: deps
temp: {}