-
Notifications
You must be signed in to change notification settings - Fork 5
/
.ci.yml
100 lines (87 loc) · 1.51 KB
/
.ci.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
---
kind: pipeline
name: build
trigger:
branch:
- master
clone:
disable: true
steps:
- name: clone
pull: if-not-exists
image: plugins/git
when:
event:
- pull_request
status:
- success
- name: test
image: elixir:1.11-alpine
commands:
- apk add --update bash openssl git
- mix local.hex --force && mix local.rebar --force
- mix hex.organization auth resuelve --key $HEX_KEY
- mix deps.get
- mix compile --warnings-as-errors
- mix test
environment:
MIX_ENV: test
HEX_KEY:
from_secret: hex_key
when:
event:
- pull_request
status:
- success
- name: notify
pull: if-not-exists
image: resuelve/drone-fish
environment:
GOOGLE_CHAT_URL:
from_secret: google_chat_url
when:
event:
- pull_request
status:
- success
- failure
---
kind: pipeline
name: publish
trigger:
event:
- tag
clone:
disable: true
steps:
- name: clone
pull: if-not-exists
image: plugins/git
when:
status:
- success
- name: publish
image: elixir:1.11-alpine
commands:
- apk add --update bash openssl git
- mix local.hex --force && mix local.rebar --force
- mix deps.get
- mix compile --warnings-as-errors
- HEX_API_KEY=$HEX_KEY mix hex.publish --yes
environment:
HEX_KEY:
from_secret: hex_key
when:
status:
- success
- name: notify
pull: if-not-exists
image: resuelve/drone-fish
environment:
GOOGLE_CHAT_URL:
from_secret: google_chat_url
when:
status:
- success
- failure
...