diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ab1fae64..5b544091 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1551,34 +1551,3 @@ jobs: send_files "${chat}" || { echo "::error::files ${chat}: $(cat /tmp/tg_doc.json)"; fail=1; } done exit "${fail}" - - # The public post: the banner with the caption, nothing else. Only for a - # release that was published, since the post links to its page. - - name: Announce on the channel - if: ${{ always() && (inputs.release || 'publish') == 'publish' && needs.publish.result == 'success' }} - continue-on-error: true - env: - TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_CHANNEL_BOT_TOKEN || secrets.TELEGRAM_BOT_TOKEN }} - CHANNEL: ${{ vars.TELEGRAM_CHANNEL }} - run: | - set -uo pipefail - if [ -z "${CHANNEL}" ] || [ -z "${TELEGRAM_BOT_TOKEN}" ]; then - echo "::notice title=Channel post skipped::Set the TELEGRAM_CHANNEL variable (for example @sozoapp) and make the bot an admin of that channel." - exit 0 - fi - if [ ! -s caption.html ]; then - echo "::warning title=Channel post skipped::No caption was built." - exit 0 - fi - API="https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}" - if [ -s banner.png ]; then - curl -sS --fail-with-body -X POST "${API}/sendPhoto" -F "chat_id=${CHANNEL}" \ - -F "photo=@banner.png" -F "caption=