We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fff7e07 commit 1dd14f5Copy full SHA for 1dd14f5
.github/workflows/onPushToMain.yml
@@ -18,7 +18,24 @@ jobs:
18
id: version-check
19
run: |
20
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 "")
+ 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
39
40
if [ -n "$exists" ];
41
then
0 commit comments