Skip to content

Commit 26ff6f9

Browse files
committed
[build] update circleci
1 parent 06e2377 commit 26ff6f9

File tree

1 file changed

+27
-11
lines changed

1 file changed

+27
-11
lines changed

.circleci/config.yml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,17 @@ jobs:
2929
- checkout
3030
- attach_workspace:
3131
at: ./ui/dist
32+
- attach_workspace:
33+
at: ./release
3234
- run: go get -v -t -d ./...
3335
- run: go test -v ./...
36+
- run:
37+
working_directory: cmd/ssl-game-controller
38+
command: |
39+
go get -v github.com/gobuffalo/packr
40+
GOOS=linux GOARCH=amd64 /go/bin/packr build -o ../../release/linux/ssl-game-controller
41+
GOOS=windows GOARCH=amd64 /go/bin/packr build -o ../../release/windows/ssl-game-controller.exe
42+
GOOS=darwin GOARCH=amd64 /go/bin/packr build -o ../../release/darwin/ssl-game-controller
3443
3544
deploy:
3645
docker:
@@ -40,24 +49,31 @@ jobs:
4049
steps:
4150
- checkout
4251
- attach_workspace:
43-
at: ./ui/dist
44-
- run: go get -v -t -d ./...
45-
- run: go get -v github.com/gobuffalo/packr
46-
- run:
47-
working_directory: cmd/ssl-game-controller
48-
command: |
49-
GOOS=linux GOARCH=amd64 /go/bin/packr build -o ../../release/linux/ssl-game-controller
50-
GOOS=windows GOARCH=amd64 /go/bin/packr build -o ../../release/windows/ssl-game-controller.exe
51-
GOOS=darwin GOARCH=amd64 /go/bin/packr build -o ../../release/darwin/ssl-game-controller
52+
at: ./release
5253
- run: ll release && tree release
5354

5455

56+
publish-github-release:
57+
docker:
58+
- image: circleci/golang:1.8
59+
steps:
60+
- attach_workspace:
61+
at: ./release
62+
- run:
63+
name: "Publish Release on GitHub"
64+
command: |
65+
go get github.com/tcnksm/ghr
66+
VERSION=$(my-binary --version)
67+
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} ./artifacts/
68+
5569
workflows:
5670
version: 2
5771
release:
5872
jobs:
5973
- frontend
60-
- backend
74+
- backend:
75+
requires:
76+
- frontend
6177
- deploy:
6278
requires:
63-
- frontend
79+
- backend

0 commit comments

Comments
 (0)