-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.drone.yml
58 lines (55 loc) · 1.17 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
kind: pipeline
name: default
steps:
- name: test
image: golang
commands:
- go build
- name: docker
image: plugins/docker
settings:
repo: syhlion/gua
auto_tag: true
purge: true
username:
from_secret: docker_account
password:
from_secret: docker_password
- name: build
image: golang
commands:
- git fetch --tags
- make build/linux_amd64.tar.gz
- make build/darwin_amd64.tar.gz
when:
event: tag
- name: publish
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files: build/*
checksum:
- md5
title: ${DRONE_TAG}
note: CHANGELOG.md
draft: true
when:
event: tag
- name: notify
image: appleboy/drone-telegram
settings:
message: >
{{#success build.status}}
{{repo.namespace}}/{{repo.name}} build {{build.number}}. commit {{commit.sha}} succeeded. Good job.
{{else}}
{{repo.namespace}}/{{repo.name}} build {{build.number}}. commit {{commit.sha}} failed. Fix me please.
{{/success}}
token:
from_secret: bot_token
to:
from_secret: bot_to
when:
status:
- failure
- success