Skip to content

Commit e68c8ea

Browse files
author
sangeet-joy_xero
committed
ci: updated jq command again
1 parent 206b112 commit e68c8ea

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Diff for: .github/workflows/check-publish.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,19 @@ jobs:
1717
repository: XeroAPI/xero-php-oauth2
1818
path: xero-php-oauth2
1919

20-
# - name: Get package version from composer file
21-
# id: get_composer_version
22-
# run: |
23-
# COMPOSER_VERSION=$(jq -r '.version' composer.json)
20+
- name: Fetch Latest release number
21+
id: get_latest_release_number
22+
run: |
23+
latest_version=$(gh release view --json tagName --jq '.tagName')
24+
echo "Latest release version is - $latest_version"
25+
echo "::set-output name=release_tag::$latest_version"
26+
working-directory: xero-python
27+
env:
28+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
2429

2530
- name: Get latest version from packgist
2631
id: get_packagist_version
2732
run: |
2833
RESPONSE=$(curl -s https://repo.packagist.org/p2/xeroapi/xero-php-oauth2.json)
29-
LATEST_VERSION=$(echo $RESPONSE | jq -r '.packages['xeroapi/xero-php-oauth2'][0].version')
34+
LATEST_VERSION=$(echo $RESPONSE | jq -r '.packages["xeroapi/xero-php-oauth2"][0].version')
3035
echo "latest packagist version $LATEST_VERSION"

0 commit comments

Comments
 (0)