Skip to content

Commit 6537dad

Browse files
authored
Release notice (#131)
1 parent b9c9fc9 commit 6537dad

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release Notice
2+
on:
3+
release:
4+
types: [published]
5+
workflow_dispatch:
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
# To check the github context
11+
- name: Dump Github context
12+
env:
13+
GITHUB_CONTEXT: ${{ toJSON(github) }}
14+
run: echo "$GITHUB_CONTEXT"
15+
- name: Send custom JSON data to Slack workflow
16+
id: slack
17+
uses: slackapi/[email protected]
18+
with:
19+
# This data can be any valid JSON from a previous step in the GitHub Action
20+
payload: |
21+
{
22+
"repository": "${{ github.repository }}",
23+
"tag_name": "${{ github.event.release.tag_name }}",
24+
"actor": "${{ github.actor }}",
25+
"body": ${{ toJSON(github.event.release.body) }},
26+
"html_url": "${{ github.event.release.html_url }}"
27+
}
28+
env:
29+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_RELEASE }}
30+
- name: Send custom JSON data to Discord
31+
uses: sarisia/[email protected]
32+
with:
33+
webhook: ${{ secrets.DISCORD_WEBHOOK_URL }}
34+
nodetail: true
35+
title: New ${{ github.repository }} version ${{ github.event.release.tag_name }} published by ${{ github.actor }}
36+
description: |
37+
Release URL: ${{ github.event.release.html_url }}
38+
Click [here](https://github.com/Countly/countly-server/blob/master/CHANGELOG.md) to view the change log.
39+
`${{ github.event.release.body }}`

0 commit comments

Comments
 (0)