Skip to content

Commit cf0db65

Browse files
author
sangeet-joy_xero
committed
ci: initial slack alert pipeline commit
1 parent 7142037 commit cf0db65

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/check-publish.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Check Packagist Publish
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
check-publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
14+
- name: Checkout repo
15+
uses: actions/checkout@v4
16+
with:
17+
repository: XeroAPI/xero-php-oauth2
18+
path: xero-php-oauth2
19+
20+
# - name: Get package version from composer file
21+
# id: get_composer_version
22+
# run: |
23+
# COMPOSER_VERSION=$(jq -r '.version' composer.json)
24+
25+
- name: Get latest version from packgist
26+
id: get_packagist_version
27+
run: |
28+
PACKAGE_NAME=$(jq -r '.name' composer.json)
29+
echo "package name - $PACKAGE_NAME"
30+
RESPONSE=$(curl -s https://packagist.org/packages/${PACKAGE_NAME}.json)
31+
LATEST_VERSION=$(echo $RESPONSE | jq -r '.package.versions[0].version')
32+
echo "latest packagist version $LATEST_VERSION"

0 commit comments

Comments
 (0)