Skip to content

Commit dcc37e8

Browse files
authored
build(core): Add workflow for release notifications for slack (#5988)
* build(core): Add workflow for release notifications for slack * fix warning
1 parent 7608ac0 commit dcc37e8

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
permissions:
2+
contents: read
3+
name: Release Notification
4+
5+
on:
6+
release:
7+
types: [published] # Trigger on new releases being published
8+
9+
jobs:
10+
slack_notification:
11+
runs-on: ubuntu-latest
12+
if: ${{ !github.event.release.prerelease }}
13+
steps:
14+
- name: Print payload
15+
run: |
16+
echo '{
17+
"version": "${{ github.event.release.tag_name }}",
18+
"releaseLink": "${{ github.event.release.html_url }}",
19+
"changelog": ${{ toJSON(github.event.release.body) }}
20+
}'
21+
22+
- name: Send Release Details to Slack
23+
uses: slackapi/[email protected]
24+
with:
25+
payload: |
26+
{
27+
"version": "${{ github.event.release.tag_name }}",
28+
"releaseLink": "${{ github.event.release.html_url }}",
29+
"changelog": ${{ toJSON(github.event.release.body) }}
30+
}
31+
env:
32+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 commit comments

Comments
 (0)