Skip to content

Commit 1dd14f5

Browse files
committed
Debugging pipeline issue
1 parent fff7e07 commit 1dd14f5

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/onPushToMain.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,24 @@ jobs:
1818
id: version-check
1919
run: |
2020
package_version=$(node -p "require('./package.json').version")
21-
exists=$(gh api repos/${{ github.repository }}/releases/tags/v$package_version >/dev/null 2>&1 && echo "true" || echo "")
21+
tag="v$package_version"
22+
23+
echo "Checking for release: $tag"
24+
25+
exists=""
26+
apiOutput=""
27+
apiStatus=0
28+
29+
apiOutput=$(gh api repos/${{ github.repository }}/releases/tags/$tag 2>&1) || apiStatus=$?
30+
31+
echo "::group::gh api response"
32+
echo "$apiOutput"
33+
echo "Status: $apiStatus"
34+
echo "::endgroup::"
35+
36+
if [ "$apiStatus" -eq 0 ]; then
37+
exists="true"
38+
fi
2239
2340
if [ -n "$exists" ];
2441
then

0 commit comments

Comments
 (0)