From ef03a902b58a8f9cdf0ed60b6372450a7ee2a257 Mon Sep 17 00:00:00 2001 From: Jerome Schneider Date: Tue, 4 Mar 2025 11:52:48 +0100 Subject: [PATCH] ci: Fix sending Slack messages during releases --- .github/workflows/release.yml | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 768356c21..be021df5d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -88,28 +88,20 @@ jobs: - name: Post to slack uses: slackapi/slack-github-action@v2.0.0 with: - channel-id: "product-releases" + method: chat.postMessage + token: ${{ secrets.SLACK_BOT_TOKEN }} payload: | - { - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": ${{ toJSON(github.event.release.html_url) }} - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": ${{ toJSON(format('>>> {0}', github.event.release.body)) }} - } - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + channel: "product-releases" + text: ${{ github.event.release.html_url }} + blocks: + - type: "section" + text: + type: "mrkdwn" + text: ${{ toJSON(github.event.release.html_url) }} + - type: "section" + text: + type: "mrkdwn" + text: ${{ toJSON(format('>>> {0}', github.event.release.body)) }} clean: name: Delete package distributions artifacts