diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index f4cc283..d3e7609 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -27,3 +27,23 @@ jobs: with: package: '@flowfuse/nr-tools-plugin' version: ${{ steps.getVersion.outputs.version }} + + notify-slack: + name: Notify about release failure + needs: [publish] + if: failure() + runs-on: ubuntu-latest + + steps: + - name: Notify Slack + uses: FlowFuse/github-actions-workflows/actions/slack_notification@slack_notification/v1 + with: + bot-token: ${{ secrets.SLACK_GHBOT_TOKEN }} + mode: channel + blocks: | + [ + { "type": "header", "text": { "type": "plain_text", "text": ":x: ${{ github.workflow }} workflow failed", "emoji": true } }, + { "type": "divider" }, + { "type": "section", "text": { "type": "mrkdwn", "text": "<${{ github.server_url }}/${{ github.repository }}/actions/workflows/release-publish.yml|${{ github.workflow }}> workflow failed to complete successfully." } }, + { "type": "section", "text": { "type": "mrkdwn", "text": "*Workflow run:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View>" } } + ]