Skip to content

Commit e48aa86

Browse files
committed
Change circleci
1 parent 976f8b4 commit e48aa86

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.circleci/config.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@ jobs:
2828
name: Building
2929
command: |
3030
VERSION=${CIRCLE_TAG}
31-
GOOS=linux GOARCH=amd64 go build -ldflags "-X main.Version=${VERSION}" -o bin/app-${VERSION}-linux-amd64 main.go
32-
GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.Version=${VERSION}" -o bin/app-${VERSION}-darwin-amd64 main.go
31+
find "resources/" -maxdepth 1 -mindepth 1 -exec cp -R -f {} artifacts/${1} \;
32+
GOOS=linux GOARCH=amd64 go build -ldflags "-X main.Version=${VERSION}" -o artifacts/app-${VERSION}-linux-amd64 main.go
33+
GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.Version=${VERSION}" -o artifacts/app-${VERSION}-darwin-amd64 main.go
3334
- persist_to_workspace:
3435
root: .
3536
paths:
36-
- bin
37+
- artifacts
3738
publish-github-release:
3839
docker:
3940
- image: cibuilds/github:0.13
@@ -44,7 +45,7 @@ jobs:
4445
name: "Publish Release on GitHub"
4546
command: |
4647
VERSION=${CIRCLE_TAG}
47-
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} ~/golang-example-app/bin
48+
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} ~/golang-example-app/artifacts
4849
workflows:
4950
version: 2
5051
main:

0 commit comments

Comments
 (0)