Skip to content

Commit e94ab1b

Browse files
committed
Update releases workflow.
1 parent a99024b commit e94ab1b

File tree

1 file changed

+43
-4
lines changed

1 file changed

+43
-4
lines changed

.github/workflows/release.yml

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
types: [published]
55
workflow_dispatch:
66
jobs:
7-
build:
7+
project-channel:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Dump Github context
@@ -15,16 +15,55 @@ jobs:
1515
if: success()
1616
uses: tokorom/action-slack-incoming-webhook@main
1717
env:
18-
INCOMING_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
18+
INCOMING_WEBHOOK_URL: ${{ secrets.SLACK_PROJECT_CHANNEL_WEBHOOK_URL }}
1919
with:
20-
text: A release is published.
20+
text: swift-composable-architecture ${{ github.event.release.tag_name }} has been released.
2121
blocks: |
2222
[
2323
{
2424
"type": "header",
2525
"text": {
2626
"type": "plain_text",
27-
"text": "New release: swift-composable-architecture ${{ github.event.release.tag_name}}"
27+
"text": "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+
]
45+
46+
releases-channel:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Dump Github context
50+
env:
51+
GITHUB_CONTEXT: ${{ toJSON(github) }}
52+
run: echo "$GITHUB_CONTEXT"
53+
- name: Slack Notification on SUCCESS
54+
if: success()
55+
uses: tokorom/action-slack-incoming-webhook@main
56+
env:
57+
INCOMING_WEBHOOK_URL: ${{ secrets.SLACK_RELEASES_WEBHOOK_URL }}
58+
with:
59+
text: swift-composable-architecture ${{ github.event.release.tag_name }} has been released.
60+
blocks: |
61+
[
62+
{
63+
"type": "header",
64+
"text": {
65+
"type": "plain_text",
66+
"text": "swift-composable-architecture ${{ github.event.release.tag_name}}"
2867
}
2968
},
3069
{

0 commit comments

Comments
 (0)