From e68c8ea242901506a717d2a22298dac6e2223ad1 Mon Sep 17 00:00:00 2001 From: sangeet-joy_xero Date: Tue, 22 Oct 2024 16:00:40 +0530 Subject: [PATCH] ci: updated jq command again --- .github/workflows/check-publish.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check-publish.yml b/.github/workflows/check-publish.yml index 3991d9c5..2bc19ee2 100644 --- a/.github/workflows/check-publish.yml +++ b/.github/workflows/check-publish.yml @@ -17,14 +17,19 @@ jobs: repository: XeroAPI/xero-php-oauth2 path: xero-php-oauth2 - # - name: Get package version from composer file - # id: get_composer_version - # run: | - # COMPOSER_VERSION=$(jq -r '.version' composer.json) + - name: Fetch Latest release number + id: get_latest_release_number + run: | + latest_version=$(gh release view --json tagName --jq '.tagName') + echo "Latest release version is - $latest_version" + echo "::set-output name=release_tag::$latest_version" + working-directory: xero-python + env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Get latest version from packgist id: get_packagist_version run: | RESPONSE=$(curl -s https://repo.packagist.org/p2/xeroapi/xero-php-oauth2.json) - LATEST_VERSION=$(echo $RESPONSE | jq -r '.packages['xeroapi/xero-php-oauth2'][0].version') + LATEST_VERSION=$(echo $RESPONSE | jq -r '.packages["xeroapi/xero-php-oauth2"][0].version') echo "latest packagist version $LATEST_VERSION"