Skip to content
This repository was archived by the owner on Dec 30, 2020. It is now read-only.

Commit bbed884

Browse files
authored
Publish binaries (#157)
* Auto publishing red-box binaries
1 parent 38c273c commit bbed884

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

.circleci/config.yml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ jobs:
2222
- run:
2323
name: Build red-box
2424
command: make
25+
- persist_to_workspace:
26+
root: /go
27+
paths:
28+
- src/github.com/sylabs/slurm-operator/bin/red-box
2529

2630
test:
2731
docker:
@@ -128,22 +132,47 @@ jobs:
128132
chmod +x push.sh
129133
./push.sh
130134
135+
release_binaries:
136+
docker:
137+
- image: circleci/golang:1.12
138+
working_directory: /go/src/github.com/sylabs/slurm-operator
139+
steps:
140+
- attach_workspace:
141+
at: /go
142+
- run:
143+
name: Release binaries
144+
command: GITHUB_TOKEN=$SYLABS_GITHUB_TOKEN RELEASE_TAG=$CIRCLE_TAG BINARY_PATH=bin/red-box make release_binaries
145+
131146
workflows:
132147
version: 2
133148
build_test_publish:
134149
jobs:
135-
- get_source
150+
- get_source:
151+
filters:
152+
tags:
153+
only: /.*/
136154
- build:
155+
filters:
156+
tags:
157+
only: /.*/
137158
requires:
138159
- get_source
139160
- test:
161+
filters:
162+
tags:
163+
only: /.*/
140164
requires:
141165
- get_source
142166
- lint:
167+
filters:
168+
tags:
169+
only: /.*/
143170
requires:
144171
- get_source
145172
- publish:
146173
filters:
174+
tags:
175+
ignore: /.*/
147176
branches:
148177
only:
149178
- master
@@ -152,3 +181,12 @@ workflows:
152181
- build
153182
- test
154183
- lint
184+
- release_binaries:
185+
filters:
186+
tags:
187+
only: /.*/
188+
branches:
189+
ignore: /.*/
190+
requires:
191+
- build
192+

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,13 @@ dep:
5050
.PHONY: gen
5151
gen:
5252
$(V)go generate generate.go
53+
54+
.PHONY: release_binaries
55+
release_binaries:
56+
$(V)go get -u github.com/itchio/gothub
57+
$(V)gothub upload --user sylabs \
58+
--repo slurm-operator \
59+
--tag ${RELEASE_TAG} \
60+
--name "red-box" \
61+
--file ${BINARY_PATH}
62+

0 commit comments

Comments
 (0)