From 56fcec3bac04fe6a47efda56008bae11116498f2 Mon Sep 17 00:00:00 2001 From: Riqwan Thamir Date: Tue, 24 Sep 2024 19:22:18 +0200 Subject: [PATCH] chore: notify slack on failed release (#9289) --- .github/workflows/release.yml | 29 --------------------------- .github/workflows/trigger-release.yml | 29 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fa12912d0e..ced86aaa60 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,32 +38,3 @@ jobs: uses: changesets/action@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Post failure to Slack channel - if: failure() - id: slack - uses: slackapi/slack-github-action@v1.23.0 - with: - channel-id: "releases" - payload: | - { - "blocks":[ - { - "type": "header", - "text": { - "type": "plain_text", - "text": "Failed to release! ⛔" - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "${{ github.event.release.html_url }}" - } - } - ] - } - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_RELEASE }} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK diff --git a/.github/workflows/trigger-release.yml b/.github/workflows/trigger-release.yml index df887d8eed..b3cdfa4b25 100644 --- a/.github/workflows/trigger-release.yml +++ b/.github/workflows/trigger-release.yml @@ -61,3 +61,32 @@ jobs: - name: Publish packages under next tag run: yarn changeset publish --no-git-tags --snapshot --tag ${{ github.event.inputs.version || 'preview' }} + + - name: Post failure to Slack channel + if: failure() + id: slack + uses: slackapi/slack-github-action@v1.23.0 + with: + channel-id: "releases" + payload: | + { + "blocks":[ + { + "type": "header", + "text": { + "type": "plain_text", + "text": "Failed to release! ⛔" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "${{ github.event.release.html_url }}" + } + } + ] + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_RELEASE }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK