-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5dbd239
commit 3432df7
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: CI for Quary CLI Action | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test-action: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test Install Latest Version | ||
uses: ./ | ||
with: | ||
version: 'latest' | ||
|
||
- name: Test Install Specific Version | ||
uses: ./ | ||
with: | ||
version: '0.0.67' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: 'Install Quary CLI' | ||
description: 'Installs the Quary CLI on Ubuntu' | ||
inputs: | ||
version: | ||
description: 'Version of Quary CLI to install' | ||
required: false | ||
default: 'latest' | ||
runs: | ||
using: 'composite' | ||
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 | ||
else | ||
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/quary | ||
quary --version | ||
shell: bash |