Skip to content
Permalink
Browse files

Build in circleci

  • Loading branch information...
frioux committed Apr 7, 2019
1 parent d23a644 commit 952ece327275be4a499eb0519a84e51c64822abf
Showing with 55 additions and 19 deletions.
  1. +55 −0 .circleci/config.yml
  2. +0 −19 .travis.yml
@@ -0,0 +1,55 @@
version: 2
jobs:
build:
working_directory: ~/mern-starter
docker:
- image: circleci/golang:1.12-stretch
steps:
- checkout
- run:
name: Create Artifacts Target
command: 'mkdir ./artifacts/'
- run:
name: Install Deps
command: 'go get ./...'
- run:
name: Windows Build
working_directory: cmd/leatherman
environment:
GO111MODULE: "on"
GOOS: windows
command: >
go build -ldflags "-s -X 'main.version=$(git describe --abbrev=7 --dirty --always)' -X 'main.when=$(date)' -X 'main.who=$(whoami)' -X 'main.where=$(hostname -f)'";
zip leatherman.zip leatherman.exe;
mv leatherman.zip ../../artifacts/leatherman-windows.zip
- run:
name: OSX Build
working_directory: cmd/leatherman
environment:
GO111MODULE: "on"
GOOS: darwin
command: >
go build -ldflags "-s -X 'main.version=$(git describe --abbrev=7 --dirty --always)' -X 'main.when=$(date)' -X 'main.who=$(whoami)' -X 'main.where=$(hostname -f)'";
xz leatherman;
mv leatherman.xz ../../artifacts/leatherman-osx.xz
- run:
name: Linux Build
command: >
make;
mv cmd/leatherman/leatherman.xz artifacts/leatherman.xz
- run:
name: Install GHR
working_directory: ~/
environment:
GO111MODULE: "off"
command: >
go get -u github.com/tcnksm/ghr
- run:
name: Release
command: >
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} untagged-${CIRCLE_SHA1} ./artifacts/
workflows:
version: 2
build_and_test:
jobs:
- build

This file was deleted.

Oops, something went wrong.

0 comments on commit 952ece3

Please sign in to comment.
You can’t perform that action at this time.