• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env bash
2set -e
3set -o pipefail
4
5if [[ -z $GITHUB_TOKEN ]]; then
6	echo "No GITHUB_TOKEN secret found, artifact publishing skipped"
7	exit
8fi
9
10mkdir -p $HOME/.local/bin
11export _GHR_VER=v0.13.0
12export _GHR=ghr_${_GHR_VER}_linux_amd64
13curl -sfL https://github.com/tcnksm/ghr/releases/download/$_GHR_VER/$_GHR.tar.gz |
14	tar xz -C $HOME/.local/bin --strip-components=1 $_GHR/ghr
15
16ghr -replace \
17	-u $CIRCLE_PROJECT_USERNAME \
18	-r $CIRCLE_PROJECT_REPONAME \
19	$CIRCLE_TAG \
20	$1
21