Skip to content

Commit 3c4eea8

Browse files
committed
Add release workflow.
1 parent d46bc92 commit 3c4eea8

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

.github/workflows/release.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [published]
5+
workflow_dispatch:
6+
jobs:
7+
release-project-channel:
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_PROJECT_CHANNEL_WEBHOOK_URL }}
19+
with:
20+
text: swift-case-paths ${{ github.event.release.tag_name }} has been released.
21+
blocks: |
22+
[
23+
{
24+
"type": "header",
25+
"text": {
26+
"type": "plain_text",
27+
"text": "swift-case-paths ${{ 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+
]
45+
release-releases-channel:
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Dump Github context
49+
env:
50+
GITHUB_CONTEXT: ${{ toJSON(github) }}
51+
run: echo "$GITHUB_CONTEXT"
52+
- name: Slack Notification on SUCCESS
53+
if: success()
54+
uses: tokorom/action-slack-incoming-webhook@main
55+
env:
56+
INCOMING_WEBHOOK_URL: ${{ secrets.SLACK_RELEASES_WEBHOOK_URL }}
57+
with:
58+
text: swift-case-paths ${{ github.event.release.tag_name }} has been released.
59+
blocks: |
60+
[
61+
{
62+
"type": "header",
63+
"text": {
64+
"type": "plain_text",
65+
"text": "swift-case-paths ${{ github.event.release.tag_name }}"
66+
}
67+
},
68+
{
69+
"type": "section",
70+
"text": {
71+
"type": "mrkdwn",
72+
"text": ${{ toJSON(github.event.release.body) }}
73+
}
74+
},
75+
{
76+
"type": "section",
77+
"text": {
78+
"type": "mrkdwn",
79+
"text": "${{ github.event.release.html_url }}"
80+
}
81+
}
82+
]

0 commit comments

Comments
 (0)