@@ -92,10 +92,35 @@ jobs:
9292 - name : Run dev semantic version (None Blocking)
9393 id : detect_semantic_version
9494 run : |
95+ echo "error catch run of semver first to get any error detail on config issues"
96+ set +e
97+ SEMVER_OUTPUT_RAW_ERROR_CHECK=$(npx semantic-release --dry-run 2> /tmp/semantic-release-errors.log)
98+ STATUS_ERROR_CHECK=$?
99+
100+ # Now you can check the status and log the error messages if an error occurred
101+ if [ $STATUS_ERROR_CHECK -ne 0 ]; then
102+ echo "❌ Semantic release failed with exit code $STATUS_ERROR_CHECK."
103+ echo "❌ Error output:"
104+ cat /tmp/semantic-release-errors.log
105+ else
106+ echo "✅ Semantic Ouput success : $SEMVER_OUTPUT_RAW_ERROR_CHECK "
107+ echo "✅ Error on success : $STATUS_ERROR_CHECK"
108+ fi
109+
110+ set -e
111+
95112
96113 echo "running semantic-release"
97- SEMVER_OUTPUT_RAW=$(npx semantic-release --dry-run 2>&1)
98- STATUS=$?
114+ semver_output_raw=$(npx semantic-release --dry-run 2>&1)
115+ status=$?
116+
117+ # Now you can check the status and log the error messages if an error occurred
118+ if [ $STATUS -ne 0 ]; then
119+ echo "Semantic release failed with exit code $STATUS."
120+ echo "Error output:"
121+ cat /tmp/semantic-release-errors.log
122+ fi
123+
99124 echo "status = $STATUS"
100125 echo "$SEMVER_OUTPUT_RAW"
101126
@@ -361,5 +386,4 @@ jobs:
361386 -H "Authorization: Bearer $TEL_GIT_PACKAGES_TOKEN" \
362387 -H "X-GitHub-Api-Version: 2022-11-28" \
363388 https://api.github.com/repos/$repo_owner/$repo_name/dispatches \
364- -d "{\"event_type\": \"$event_type\", \"client_payload\": {\"artifact_url\": \"$artifact_url\"}}"
365-
389+ -d "{\"event_type\": \"$event_type\", \"client_payload\": {\"artifact_url\": \"$artifact_url\"}}"
0 commit comments