1
1
mirror of https://github.com/Yvee1/hascard.git synced 2024-11-22 22:12:06 +03:00
hascard/.github/scripts/install-ghr.sh

21 lines
445 B
Bash
Raw Normal View History

2021-07-16 21:02:35 +03:00
set -o errexit -o verbose
if test ! "$GITHUB_REF"
then
echo 'This is not a release build.'
else
if [ "$RUNNER_OS" = "linux" ]
then
ARCH="linux"
else
ARCH="darwin"
fi
echo "Installing ghr"
URL="https://github.com/tcnksm/ghr/releases/download/v0.5.4/ghr_v0.5.4_${ARCH}_386.zip"
curl -L ${URL} > ghr.zip
mkdir -p "$HOME/bin"
export PATH="$HOME/bin:$PATH"
unzip ghr.zip -d "$HOME/bin"
rm ghr.zip
fi