-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
99 lines (95 loc) · 2.38 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
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
type: docker
name: default
trigger:
event:
- tag
concurrency:
limit: 1
workspace:
path: /drone/src
steps:
- name: checkout submodule
image: alpine/git
commands:
- git submodule update --init --recursive
- name: checkout tag
image: alpine/git
commands:
- cd bottom
- git fetch --all --tags
- git checkout tags/${DRONE_TAG}
depends_on:
- "checkout submodule"
- name: cargo build
image: rust:latest
commands:
- cd bottom
- cargo build --release --target x86_64-unknown-linux-gnu
- cd target/x86_64-unknown-linux-gnu/release
depends_on:
- "checkout tag"
- name: build slackware package
image: vbatts/slackware:14.2
commands:
- mkdir -p dist/usr/sbin
- cp bottom/target/x86_64-unknown-linux-gnu/release/btm ./dist/usr/sbin/btm
- cp -R ./usr ./dist
- chmod +x ./dist/usr/sbin/btm
- cd dist
- makepkg -l y -c y ../unraid-bottom-${DRONE_TAG}.txz
depends_on:
- "cargo build"
- name: prepare release
image: vbatts/slackware:14.2
commands:
- echo "bottom ${DRONE_TAG} - built@$(date '+%FT%TZ') [Drone ${DRONE_SYSTEM_VERSION}]" > ./release_note
- cat ./release_note
depends_on:
- "build slackware package"
- name: publish gitea release
image: plugins/gitea-release
settings:
api_key:
from_secret: GITEA_KEY
base_url: https://git.panaetius.co.uk
files:
- ./unraid-bottom-${DRONE_TAG}.txz
checksum:
- md5
title: ${DRONE_TAG}
note: ./release_note
file_exists: "skip"
when:
event: tag
depends_on:
- "prepare release"
- name: publish github release
image: plugins/github-release@sha256:24f5fb388173c0ec211d1c73d2c4441efd3cd24d0ba9eea148b98c40d03807ff
settings:
api_key:
from_secret: GITHUB_KEY
files:
- ./unraid-bottom-${DRONE_TAG}.txz
checksum:
- md5
title: ${DRONE_TAG}
note: ./release_note
file_exists: "skip"
when:
event: tag
depends_on:
- "prepare release"
- name: slack
image: plugins/slack
settings:
webhook:
from_secret: BUILD_STATUS_SLACK_WEBHOOK
username: drone
when:
status:
- "success"
- "failure"
depends_on:
- "publish gitea release"
- "publish github release"