From d027f1f74da4faa03204b4452d7cff4f7534b3fe Mon Sep 17 00:00:00 2001 From: Louis Date: Sun, 21 Jan 2024 17:26:20 -0800 Subject: [PATCH] update --- action.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/action.yml b/action.yml index e71da69..bc2dbc5 100644 --- a/action.yml +++ b/action.yml @@ -10,17 +10,17 @@ runs: steps: - run: | if [ "${{ inputs.version }}" = "latest" ]; then - # Fetch the latest release tag from GitHub API without authentication - LATEST_VERSION=$(curl -s https://api.github.com/repos/quarylabs/quary-cli/releases/latest | grep 'tag_name' | cut -d '"' -f 4) - echo "Latest version is $LATEST_VERSION" - VERSION=$LATEST_VERSION + # Fetch the latest release tag from GitHub API without authentication + LATEST_VERSION=$(curl -s https://api.github.com/repos/quarylabs/quary-cli/releases/latest | grep 'tag_name' | cut -d '"' -f 4) + echo "Latest version is $LATEST_VERSION" + VERSION=$LATEST_VERSION else - VERSION=${{ inputs.version }} + VERSION=${{ inputs.version }} fi echo "Installing Quary CLI version $VERSION" wget https://github.com/quarylabs/quary-cli/releases/download/$VERSION/quary-$VERSION-quary-linux-x86_64-gnu.zip -O quary-cli.zip unzip quary-cli.zip -d quary-cli - sudo mv quary-cli/quary-$VERSION /usr/local/bin + sudo mv "quary-cli/quary-$VERSION" /usr/local/bin/quary quary --version - shell: bash + shell: bash