Skip to content

Commit

Permalink
chore: update workflow for cpp lib update
Browse files Browse the repository at this point in the history
  • Loading branch information
jolars committed Jun 4, 2024
1 parent 927fb03 commit 160e457
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/update-cpplibrary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ jobs:
id: check_release
run: |
API_URL="https://api.github.com/repos/jolars/qualpal/releases/latest"
NEW_VERSION=$(curl -s $API_URL | jq -r '.tag_name')
NEW_VERSION=$(curl -s $API_URL | jq -r '.tag_name' | tr -d 'v')
CURRENT_VERSION=$(cat src/qualpal/version.txt)
if [[ "$NEW_VERSION" > "$CURRENT_VERSION" ]]; then
if [[ "$NEW_VERSION" != "$CURRENT_VERSION" ]]; then
RELEASE_URL=$(curl -s $API_URL | grep "tarball_url" | cut -d '"' -f 4)
echo "release_url=$RELEASE_URL" >> $GITHUB_OUTPUT
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
echo "update_needed=true" >> $GITHUB_OUTPUT
else
echo "update_needed=false" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 160e457

Please sign in to comment.