chore: notify slack on failed release (#9289)
This commit is contained in:
29
.github/workflows/release.yml
vendored
29
.github/workflows/release.yml
vendored
@@ -38,32 +38,3 @@ jobs:
|
|||||||
uses: changesets/action@v1
|
uses: changesets/action@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
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
|
|
||||||
|
|||||||
29
.github/workflows/trigger-release.yml
vendored
29
.github/workflows/trigger-release.yml
vendored
@@ -61,3 +61,32 @@ jobs:
|
|||||||
|
|
||||||
- name: Publish packages under next tag
|
- name: Publish packages under next tag
|
||||||
run: yarn changeset publish --no-git-tags --snapshot --tag ${{ github.event.inputs.version || 'preview' }}
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user