-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
63 lines (58 loc) · 1.57 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
kind: pipeline
type: docker
name: default
trigger:
ref:
include:
- refs/heads/master
- refs/pull/**
- refs/tags/**
steps:
- name: build-amd64
image: golang:1.12
commands:
- apt update && apt install ca-certificates libgnutls30 -y
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o release/linux/amd64/terraform-credentials-env
when:
event:
- push
- pull_request
- tag
- name: artifacts-amd64
image: golang:1.12
commands:
- tar -cvzf release/terraform-credentials-env_linux_amd64.tar.gz -C release/linux/amd64 terraform-credentials-env
- sha256sum release/*.tar.gz > release/terraform-credentials-env_checksums.txt
when:
event:
- push
- tag
- name: build-arm64
image: golang:1.12
commands:
- apt update && apt install ca-certificates libgnutls30 -y
- CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o release/linux/arm64/terraform-credentials-env
when:
event:
- push
- pull_request
- tag
- name: artifacts-arm64
image: golang:1.12
commands:
- tar -cvzf release/terraform-credentials-env_linux_arm64.tar.gz -C release/linux/arm64 terraform-credentials-env
- sha256sum release/*.tar.gz >> release/terraform-credentials-env_checksums.txt
when:
event:
- push
- tag
- name: release
image: plugins/github-release
settings:
files:
- release/terraform-credentials-env_*.tar.gz
- release/terraform-credentials-env_checksums.txt
api_key:
from_secret: api_key
when:
event: tag