-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (56 loc) · 1.68 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Publish
on:
release:
types: [ published ]
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Post to a Slack channel
id: slack
uses: slackapi/slack-github-action@v1
with:
payload: |
{
"text": "New release ${{github.ref_name}} for ${{github.event.repository.name}}.",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "New release for <${{github.event.repository.html_url}}|`${{github.event.repository.name}}`>\n*<${{github.event.release.html_url}}|release notes>*"
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Project:*\n${{github.event.repository.name}}"
},
{
"type": "mrkdwn",
"text": "*Version:*\n${{github.ref_name}}"
}
]
},
{
"type": "context",
"elements": [
{
"type": "image",
"image_url": "${{github.event.sender.avatar_url}}",
"alt_text": "${{github.event.sender.login}}"
},
{
"type": "mrkdwn",
"text": "*${{github.event.sender.login}}* has triggered this release."
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.PIPELINE_SLACK_CHANNEL_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK