add ci file

This commit is contained in:
Jay 2019-05-09 16:30:35 +08:00
parent 4fa99f16bd
commit e5983c3fab

View File

@ -4,6 +4,28 @@ name: build_release
steps: steps:
- name: test and build - name: test and build
image: golang image: golang
volumes:
- name: deps
path: /build
commands: commands:
- go test - go test ./...
- go build - 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: {}