-
Notifications
You must be signed in to change notification settings - Fork 0
/
wercker.yml
47 lines (47 loc) · 1.43 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
box: golang:1.5.3
build:
steps:
- script:
name: setup env
code: |
export GOPATH="/go" && \
export PACKAGE="github.com/stepanstipl/greenpeace" && \
export GO15VENDOREXPERIMENT=1 && \
mkdir -p "${GOPATH}/src/github.com/stepanstipl" && \
ln -s "${WERCKER_SOURCE_DIR}" "${GOPATH}/src/${PACKAGE}"
- script:
name: go build
code: |
CGO_ENABLED=0 go build -a -ldflags '-s' -v $PACKAGE
# - script:
# name: go test
# code: |
# go test -v $PACKAGE
- script:
name: create greenpeace binary archive
code: |
tar zcvf "${WERCKER_OUTPUT_DIR}/greenpeace.tar.gz" greenpeace
- script:
name: output release tag
code: |
git describe --tags --exact --match '*.*.*' | tee "${WERCKER_OUTPUT_DIR}/.release_tag" || true
- script:
name: wercker debug
code: |
ls -al $WERCKER_OUTPUT_DIR
deploy:
steps:
- script:
name: restore release tag
code: |
echo $WERCKER_ROOT && \
ls -al $WERCKER_ROOT && \
export MY_RELEASE_TAG=$(cat $WERCKER_ROOT/.release_tag) && \
echo "Release tag: ${MY_RELEASE_TAG}"
- github-create-release:
token: $GITHUB_TOKEN
tag: $MY_RELEASE_TAG
- github-upload-asset:
token: $GITHUB_TOKEN
file: greenpeace.tar.gz
content_type: application/x-gzip