This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
.drone.yml
50 lines (45 loc) · 1.84 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
workspace:
base: /go
path: src/github.com/artisanofcode/terraform-provider-drone
pipeline:
test:
image: golang:1.10
environment:
- TF_ACC=1
- DRONE_USER=terraform-provider-drone
secrets:
- drone_server
- drone_token
commands:
- go get
- go test -v ./...
build:
image: golang:1.10
commands:
- go get
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o dist/linux_amd64/terraform-provider-drone_${DRONE_TAG}
- CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o dist/linux_arm64/terraform-provider-drone_${DRONE_TAG}
- CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -o dist/linux_arm/terraform-provider-drone_${DRONE_TAG}
- CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o dist/windows_amd64/terraform-provider-drone_${DRONE_TAG}
- CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o dist/darwin_amd64/terraform-provider-drone_${DRONE_TAG}
- tar -cvzf dist/terraform-provider-drone_linux_amd64.tar.gz -C dist/linux_amd64 terraform-provider-drone_${DRONE_TAG}
- tar -cvzf dist/terraform-provider-drone_linux_arm64.tar.gz -C dist/linux_arm64 terraform-provider-drone_${DRONE_TAG}
- tar -cvzf dist/terraform-provider-drone_linux_arm.tar.gz -C dist/linux_arm terraform-provider-drone_${DRONE_TAG}
- tar -cvzf dist/terraform-provider-drone_windows_amd64.tar.gz -C dist/windows_amd64 terraform-provider-drone_${DRONE_TAG}
- tar -cvzf dist/terraform-provider-drone_darwin_amd64.tar.gz -C dist/darwin_amd64 terraform-provider-drone_${DRONE_TAG}
when:
event: tag
release:
image: plugins/github-release
files:
- dist/*.tar.gz
checksum:
- md5
- sha1
- sha256
- sha512
secrets:
- source: github_token
target: github_release_api_key
when:
event: tag