Skip to content

Instantly share code, notes, and snippets.

@youyo
Created June 18, 2016 04:08
Show Gist options
  • Select an option

  • Save youyo/f3696024d660dd33caadbbf84de879bf to your computer and use it in GitHub Desktop.

Select an option

Save youyo/f3696024d660dd33caadbbf84de879bf to your computer and use it in GitHub Desktop.
phase1:
box:
id: golang:1.6.2-alpine
cmd: /bin/sh
steps:
- wercker/setup-go-workspace:
package-dir: github.com/youyo/wercker-test
- script:
name: Build
code: |-
go build
mv wercker-test ${WERCKER_OUTPUT_DIR}/wercker-test
grep -w 'const Version string' version.go | awk -F '"' '{print "v"$2}' > ${WERCKER_OUTPUT_DIR}/version.txt
phase2:
box:
id: golang:1.6.2-alpine
cmd: /bin/sh
steps:
- script:
name: Deploy
code: |-
ghr -t ${GITHUB_TOKEN} -u youyo -r wercker-test --replace `cat version.txt` wercker-test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment