forked from minotar/imgd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwercker.yml
57 lines (47 loc) · 1.31 KB
/
wercker.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
box: golang:alpine
env:
GO111MODULE: off
build:
steps:
- setup-go-workspace
- script:
name: install build dependency
code: |
apk --no-cache add git
# Gets the dependencies
- script:
name: go get
code: |
go version
go get -t
# Build the project for Linux and Mac
- script:
name: go build
code: |
GOOS=linux GOARCH=amd64 go build -o $WERCKER_OUTPUT_DIR/imgd_linux_amd64
GOOS=darwin GOARCH=amd64 go build -o $WERCKER_OUTPUT_DIR/imgd_darwin_amd64
# Test the project
- script:
name: go test
code: |
# If we don't pull in sub-packages imports, then this will fail
# go test ./...
go test
release:
steps:
- script:
name: install release dependencies
code: |
apk --no-cache add file curl
# Should ideally use some intelligence to get version, eg $(./imgd -version) would be cool
- github-create-release:
token: $GITHUB_TOKEN
tag: 3.0.1
title: imgd 3.0.1
draft: true
- github-upload-asset:
token: $GITHUB_TOKEN
file: $WERCKER_ROOT/imgd_linux_amd64
- github-upload-asset:
token: $GITHUB_TOKEN
file: $WERCKER_ROOT/imgd_darwin_amd64