From daf7583c7953c5c483bf5cfc597e5bde2311b7b8 Mon Sep 17 00:00:00 2001 From: Henrik <15855905+high3eam@users.noreply.github.com> Date: Sun, 9 Feb 2025 21:36:17 +0100 Subject: [PATCH] Update release-nr-mod.yml --- .github/workflows/release-nr-mod.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-nr-mod.yml b/.github/workflows/release-nr-mod.yml index c628769..6843903 100644 --- a/.github/workflows/release-nr-mod.yml +++ b/.github/workflows/release-nr-mod.yml @@ -68,12 +68,18 @@ jobs: CHAT_ID_1: ${{ secrets.TELEGRAM_CHAT_ID_1_GROUP }} CHAT_ID_2: ${{ secrets.TELEGRAM_CHAT_ID_2 }} run: | - # Send to first chat - curl -F document=@"p9_nr_platform_mod_v${{ env.MOD_VERSION }}.zip" \ + # Send to first chat (with error checking) + if ! curl -s -f -o /dev/null -F document=@"p9_nr_platform_mod_v${{ env.MOD_VERSION }}.zip" \ -F caption="New NR Module Release ${{ env.RELEASE_TAG }}" \ - "https://api.telegram.org/bot${BOT_TOKEN}/sendDocument?chat_id=${CHAT_ID_1}" + "https://api.telegram.org/bot${BOT_TOKEN}/sendDocument?chat_id=${CHAT_ID_1}"; then + echo "Failed to send to first chat" + exit 1 + fi - # Send to second chat - curl -F document=@"p9_nr_platform_mod_v${{ env.MOD_VERSION }}.zip" \ + # Send to second chat (with error checking) + if ! curl -s -f -o /dev/null -F document=@"p9_nr_platform_mod_v${{ env.MOD_VERSION }}.zip" \ -F caption="New NR Module Release ${{ env.RELEASE_TAG }}" \ - "https://api.telegram.org/bot${BOT_TOKEN}/sendDocument?chat_id=${CHAT_ID_2}" + "https://api.telegram.org/bot${BOT_TOKEN}/sendDocument?chat_id=${CHAT_ID_2}"; then + echo "Failed to send to second chat" + exit 1 + fi