Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
louisjoecodes committed Jan 22, 2024
1 parent 1528392 commit 19c55fe
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ runs:
steps:
- run: |
if [ "${{ inputs.version }}" = "latest" ]; then
# Use GitHub token for authenticated API requests
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
# Fetch the latest release tag from GitHub API
LATEST_VERSION=$(curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/quarylabs/quary-cli/releases/latest | grep 'tag_name' | cut -d '"' -f 4)
# 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
Expand All @@ -26,5 +24,3 @@ runs:
sudo mv quary-cli/quary /usr/local/bin
quary --version
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 19c55fe

Please sign in to comment.