mirror of
https://github.com/Yvee1/hascard.git
synced 2024-11-22 04:33:06 +03:00
Fix issues in Windows workflow
This commit is contained in:
parent
458cf138d6
commit
ff2430e9d2
2
.github/scripts/attach-binary.sh
vendored
2
.github/scripts/attach-binary.sh
vendored
@ -22,7 +22,7 @@ else
|
||||
cp "$BIN" "./$REPO.exe"
|
||||
chmod +x "./$REPO.exe"
|
||||
BUNDLE_NAME="$REPO-$RELEASE_VERSION-$ARCH.zip"
|
||||
zip "$BUNDLE_NAME" "$REPO.exe"
|
||||
powershell Compress-Archive -Path "$REPO.exe" -DestinationPath "$BUNDLE_NAME"
|
||||
echo "SHA256:"
|
||||
shasum -a 256 "$BUNDLE_NAME"
|
||||
ls $HOME/ghr/
|
||||
|
64
.github/scripts/install-ghr.sh
vendored
64
.github/scripts/install-ghr.sh
vendored
@ -5,37 +5,37 @@ then
|
||||
echo 'This is not a release build.'
|
||||
else
|
||||
mkdir -p "$HOME/.local/bin"
|
||||
echo "Installing ghr"
|
||||
if [ "$RUNNER_OS" = "Linux" ]
|
||||
then
|
||||
ARCH="linux"
|
||||
URL="https://github.com/tcnksm/ghr/releases/download/v0.14.0/ghr_v0.14.0_${ARCH}_amd64.tar.gz"
|
||||
curl -L ${URL} > ghr.tar.gz
|
||||
gunzip ghr.tar.gz
|
||||
tar -x -f ghr.tar --strip-components 1
|
||||
mv ghr "$HOME/.local/bin/"
|
||||
rm ghr.tar
|
||||
elif [ "$RUNNER_OS" = "Windows"]
|
||||
then
|
||||
ARCH="windows"
|
||||
URL="https://github.com/tcnksm/ghr/releases/download/v0.14.0/ghr_v0.14.0_${ARCH}_amd64.zip"
|
||||
curl -L ${URL} > ghr.zip
|
||||
unzip ghr.zip
|
||||
GHR_DIR="ghr_v0.14.0_${ARCH}_amd64"
|
||||
mkdir "$HOME/ghr"
|
||||
mv $GHR_DIR/ghr.exe "$HOME/ghr"
|
||||
export PATH=$PATH:"$HOME/ghr"
|
||||
rm ghr.zip
|
||||
rm -r $GHR_DIR
|
||||
else
|
||||
ARCH="darwin"
|
||||
URL="https://github.com/tcnksm/ghr/releases/download/v0.14.0/ghr_v0.14.0_${ARCH}_amd64.zip"
|
||||
curl -L ${URL} > ghr.zip
|
||||
unzip ghr.zip
|
||||
GHR_DIR="ghr_v0.14.0_${ARCH}_amd64"
|
||||
mv $GHR_DIR/ghr "$HOME/.local/bin/"
|
||||
rm ghr.zip
|
||||
rm -r $GHR_DIR
|
||||
fi
|
||||
echo "Installing ghr for $RUNNER_OS..."
|
||||
if [ "$RUNNER_OS" = "Linux" ]
|
||||
then
|
||||
ARCH="linux"
|
||||
URL="https://github.com/tcnksm/ghr/releases/download/v0.14.0/ghr_v0.14.0_${ARCH}_amd64.tar.gz"
|
||||
curl -L ${URL} > ghr.tar.gz
|
||||
gunzip ghr.tar.gz
|
||||
tar -x -f ghr.tar --strip-components 1
|
||||
mv ghr "$HOME/.local/bin/"
|
||||
rm ghr.tar
|
||||
elif [ "$RUNNER_OS" = "Windows" ]
|
||||
then
|
||||
ARCH="windows"
|
||||
URL="https://github.com/tcnksm/ghr/releases/download/v0.14.0/ghr_v0.14.0_${ARCH}_amd64.zip"
|
||||
curl -L ${URL} > ghr.zip
|
||||
unzip ghr.zip
|
||||
GHR_DIR="ghr_v0.14.0_${ARCH}_amd64"
|
||||
mkdir "$HOME/ghr"
|
||||
mv $GHR_DIR/ghr.exe "$HOME/ghr"
|
||||
export PATH=$PATH:"$HOME/ghr"
|
||||
rm ghr.zip
|
||||
rm -r $GHR_DIR
|
||||
else
|
||||
ARCH="darwin"
|
||||
URL="https://github.com/tcnksm/ghr/releases/download/v0.14.0/ghr_v0.14.0_${ARCH}_amd64.zip"
|
||||
curl -L ${URL} > ghr.zip
|
||||
unzip ghr.zip
|
||||
GHR_DIR="ghr_v0.14.0_${ARCH}_amd64"
|
||||
mv $GHR_DIR/ghr "$HOME/.local/bin/"
|
||||
rm ghr.zip
|
||||
rm -r $GHR_DIR
|
||||
fi
|
||||
ls "$HOME/.local/bin/"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user