@@ -21,17 +21,17 @@ jobs:
2121 - name : Set up Python
2222 uses : actions/setup-python@v2
2323 with :
24- python-version : ' 3.x'
24+ python-version : " 3.x"
2525
2626 - name : Install hatch
27- run : |
27+ run : |
2828 pip install hatch
29-
29+
3030 - name : Get Version
3131 id : version
32- run : |
32+ run : |
3333 echo "version=$(hatch version)" >> $GITHUB_OUTPUT
34-
34+
3535 publish :
3636 runs-on : ubuntu-latest
3737 needs :
@@ -54,17 +54,58 @@ jobs:
5454 - name : Set up Python
5555 uses : actions/setup-python@v2
5656 with :
57- python-version : ' 3.x'
57+ python-version : " 3.x"
5858
5959 - name : Install hatch
60- run : |
60+ run : |
6161 pip install hatch
6262
6363 - name : Build SDK
64- run : |
64+ run : |
6565 hatch build
6666
6767 - name : Publish Python 🐍 distributions 📦 to PyPI
6868 uses : pypa/gh-action-pypi-publish@master
6969 with :
7070 password : ${{ secrets.PYPI_TOKEN }}
71+
72+ post-release :
73+ name : Post Release Actions
74+
75+ runs-on : ubuntu-latest
76+ if : ${{ always() }}
77+ needs :
78+ - generate-version
79+ - publish
80+
81+ steps :
82+ - name : Checkout main branch
83+ 84+ with :
85+ ref : main
86+
87+ - name : Slack - Success Message
88+ uses : DSdatsme/slack-github-action@env_support
89+ if : ${{ success() && needs.publish.result == 'success' }}
90+ with :
91+ channel-id : ${{ vars.SLACK_CHANNEL_ID }}
92+ payload-file-path : ./.github/resources/slack-payloads/slack-message-template.json
93+ env :
94+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
95+ RELEASETAG : ${{ needs.generate-version.outputs.new_version }}
96+ PRE_TEXT_MESSAGE : " Workflow Passed! :successkid:"
97+ FALLBACK_MESSAGE : " Workflow Passed!"
98+ COLOR : " good"
99+
100+ - name : Slack - Failure Message
101+ uses : DSdatsme/slack-github-action@env_support
102+ if : ${{ failure() || needs.publish.result != 'success' }}
103+ with :
104+ channel-id : ${{ vars.SLACK_CHANNEL_ID }}
105+ payload-file-path : ./.github/resources/slack-payloads/slack-message-template.json
106+ env :
107+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
108+ RELEASETAG : ${{ needs.generate-version.outputs.new_version }}
109+ PRE_TEXT_MESSAGE : " <!channel> Workflow Failed! :x:"
110+ FALLBACK_MESSAGE : " Workflow Failed!"
111+ COLOR : " danger"
0 commit comments