[ci] Bump ghr tool used to post release artifacts to v0.14.0

Also make sure we only download it once per CI run, not three times...
This commit is contained in:
Caleb Maclennan 2021-08-18 13:23:19 +03:00 committed by Khaled Hosny
parent 80ff72f39d
commit a997f8918e
1 changed files with 8 additions and 5 deletions

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
set -o pipefail set -o pipefail
@ -7,11 +8,13 @@ if [[ -z $GITHUB_TOKEN ]]; then
exit exit
fi fi
mkdir -p $HOME/.local/bin if ! hash ghr 2> /dev/null; then
export _GHR_VER=v0.13.0 _GHR_VER=v0.14.0
export _GHR=ghr_${_GHR_VER}_linux_amd64 _GHR=ghr_${_GHR_VER}_linux_amd64
curl -sfL https://github.com/tcnksm/ghr/releases/download/$_GHR_VER/$_GHR.tar.gz | mkdir -p $HOME/.local/bin
curl -sfL https://github.com/tcnksm/ghr/releases/download/$_GHR_VER/$_GHR.tar.gz |
tar xz -C $HOME/.local/bin --strip-components=1 $_GHR/ghr tar xz -C $HOME/.local/bin --strip-components=1 $_GHR/ghr
fi
ghr -replace \ ghr -replace \
-u $CIRCLE_PROJECT_USERNAME \ -u $CIRCLE_PROJECT_USERNAME \