Skip to content

Commit

Permalink
Fix issues in Windows workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvee1 committed Dec 23, 2023
1 parent 458cf13 commit ff2430e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/attach-binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
64 changes: 32 additions & 32 deletions .github/scripts/install-ghr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ff2430e

Please sign in to comment.