@@ -92,13 +92,27 @@ 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=$?
9599
96- echo "running semantic-release"
97- # SEMVER_OUTPUT_RAW=$(npx semantic-release --dry-run 2>&1)
98- # STATUS=$?
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
99109
100- SEMVER_OUTPUT_RAW=$(npx semantic-release --dry-run 2> /tmp/semantic-release-errors.log)
101- STATUS=$?
110+ set -e
111+
112+
113+ echo "running semantic-release"
114+ semver_output_raw=$(npx semantic-release --dry-run 2>&1)
115+ status=$?
102116
103117 # Now you can check the status and log the error messages if an error occurred
104118 if [ $STATUS -ne 0 ]; then
@@ -372,5 +386,4 @@ jobs:
372386 -H "Authorization: Bearer $TEL_GIT_PACKAGES_TOKEN" \
373387 -H "X-GitHub-Api-Version: 2022-11-28" \
374388 https://api.github.com/repos/$repo_owner/$repo_name/dispatches \
375- -d "{\"event_type\": \"$event_type\", \"client_payload\": {\"artifact_url\": \"$artifact_url\"}}"
376-
389+ -d "{\"event_type\": \"$event_type\", \"client_payload\": {\"artifact_url\": \"$artifact_url\"}}"
0 commit comments