Skip to content

Commit fb2e525

Browse files
author
Inbal Tako
committed
Add slack notification to publish
1 parent 36f1664 commit fb2e525

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

.github/workflows/publish.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ jobs:
88
deploy:
99
runs-on: ubuntu-latest
1010
steps:
11+
- name: Notify slack success
12+
if: success()
13+
id: slack # IMPORTANT: reference this step ID value in future Slack steps
14+
env:
15+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
16+
uses: voxmedia/[email protected]
17+
with:
18+
channel: github-actions
19+
status: STARTING
20+
color: warning
21+
1122
- uses: actions/checkout@v2
1223
- name: Set up Python
1324
uses: actions/setup-python@v2
@@ -23,4 +34,26 @@ jobs:
2334
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
2435
run: |
2536
python setup.py sdist bdist_wheel
26-
twine upload dist/*
37+
twine upload dist/*
38+
39+
- name: Notify slack success
40+
if: success()
41+
env:
42+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
43+
uses: voxmedia/[email protected]
44+
with:
45+
message_id: ${{ steps.slack.outputs.message_id }}
46+
channel: github-actions
47+
status: SUCCESS
48+
color: good
49+
50+
- name: Notify slack fail
51+
if: failure()
52+
env:
53+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
54+
uses: voxmedia/[email protected]
55+
with:
56+
message_id: ${{ steps.slack.outputs.message_id }}
57+
channel: github-actions
58+
status: FAILED
59+
color: danger

0 commit comments

Comments
 (0)