Skip to content

Commit a99024b

Browse files
Workflow for slack release. (#1899)
* Workflow for slack release. * wip * Update .github/workflows/release.yml Co-authored-by: Stephen Celis <[email protected]> * Update .github/workflows/release.yml Co-authored-by: Stephen Celis <[email protected]> --------- Co-authored-by: Stephen Celis <[email protected]>
1 parent 5d490c7 commit a99024b

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [published]
5+
workflow_dispatch:
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Dump Github context
11+
env:
12+
GITHUB_CONTEXT: ${{ toJSON(github) }}
13+
run: echo "$GITHUB_CONTEXT"
14+
- name: Slack Notification on SUCCESS
15+
if: success()
16+
uses: tokorom/action-slack-incoming-webhook@main
17+
env:
18+
INCOMING_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
19+
with:
20+
text: A release is published.
21+
blocks: |
22+
[
23+
{
24+
"type": "header",
25+
"text": {
26+
"type": "plain_text",
27+
"text": "New release: swift-composable-architecture ${{ github.event.release.tag_name}}"
28+
}
29+
},
30+
{
31+
"type": "section",
32+
"text": {
33+
"type": "mrkdwn",
34+
"text": ${{ toJSON(github.event.release.body) }}
35+
}
36+
},
37+
{
38+
"type": "section",
39+
"text": {
40+
"type": "mrkdwn",
41+
"text": "${{ github.event.release.html_url }}"
42+
}
43+
}
44+
]

0 commit comments

Comments
 (0)