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

Commit

Permalink
Publish binaries (#157)
Browse files Browse the repository at this point in the history
* Auto publishing red-box binaries
  • Loading branch information
pisarukv authored Jun 18, 2019
1 parent 38c273c commit bbed884
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
40 changes: 39 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ jobs:
- run:
name: Build red-box
command: make
- persist_to_workspace:
root: /go
paths:
- src/github.com/sylabs/slurm-operator/bin/red-box

test:
docker:
Expand Down Expand Up @@ -128,22 +132,47 @@ jobs:
chmod +x push.sh
./push.sh
release_binaries:
docker:
- image: circleci/golang:1.12
working_directory: /go/src/github.com/sylabs/slurm-operator
steps:
- attach_workspace:
at: /go
- run:
name: Release binaries
command: GITHUB_TOKEN=$SYLABS_GITHUB_TOKEN RELEASE_TAG=$CIRCLE_TAG BINARY_PATH=bin/red-box make release_binaries

workflows:
version: 2
build_test_publish:
jobs:
- get_source
- get_source:
filters:
tags:
only: /.*/
- build:
filters:
tags:
only: /.*/
requires:
- get_source
- test:
filters:
tags:
only: /.*/
requires:
- get_source
- lint:
filters:
tags:
only: /.*/
requires:
- get_source
- publish:
filters:
tags:
ignore: /.*/
branches:
only:
- master
Expand All @@ -152,3 +181,12 @@ workflows:
- build
- test
- lint
- release_binaries:
filters:
tags:
only: /.*/
branches:
ignore: /.*/
requires:
- build

10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,13 @@ dep:
.PHONY: gen
gen:
$(V)go generate generate.go

.PHONY: release_binaries
release_binaries:
$(V)go get -u github.com/itchio/gothub
$(V)gothub upload --user sylabs \
--repo slurm-operator \
--tag ${RELEASE_TAG} \
--name "red-box" \
--file ${BINARY_PATH}

0 comments on commit bbed884

Please sign in to comment.