Skip to content

Commit

Permalink
chore: Send notis to slack on release
Browse files Browse the repository at this point in the history
  • Loading branch information
olivermrbl committed Nov 9, 2022
1 parent 386a3e4 commit 54c9ded
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/release-notification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Release notification
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# To check the github context
- name: Parse github event
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Send Slack notification on release
if: success()
uses: tokorom/action-slack-incoming-webhook@main
env:
INCOMING_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
text: "test"
blocks: |
[
{
"type": "header",
"text": {
"type": "plain_text",
"text": "${{ github.event.release.tag_name}} is published!"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Author:*\n${{ github.actor }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Information:*"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ${{ toJSON(github.event.release.body) }}
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ github.event.release.html_url }}"
}
}
]

0 comments on commit 54c9ded

Please sign in to comment.