@@ -3,10 +3,10 @@ name: Maven Deploy and Release
33on :
44 push :
55 branches :
6- - master
7- - latest
8- paths :
9- - superstream-clients/pom.xml
6+ - github-action
7+ # - latest
8+ # paths:
9+ # - superstream-clients/pom.xml
1010
1111jobs :
1212 deploy :
9797 cd superstream-clients
9898 gh release create $VERSION target/superstream-clients-${VERSION}.jar --generate-notes
9999
100+ - name : Send Slack Notification - Success
101+ if : success() && steps.deployment.outputs.type == 'production'
102+ uses : slackapi/slack-github-action@v1
103+ with :
104+ payload : |
105+ {
106+ "text": "✅ Production deployment succeeded for superstream-clients-java version ${{ steps.version.outputs.base }}",
107+ "blocks": [
108+ {
109+ "type": "section",
110+ "text": {
111+ "type": "mrkdwn",
112+ "text": "✅ *Production Deployment Succeeded*\n*Repository:* ${{ github.repository }}\n*Version:* ${{ steps.version.outputs.base }}\n*Branch:* ${{ steps.deployment.outputs.branch }}\n*Triggered by:* ${{ github.actor }}"
113+ }
114+ }
115+ ]
116+ }
117+ env :
118+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
119+ SLACK_WEBHOOK_TYPE : INCOMING_WEBHOOK
100120
121+ - name : Send Slack Notification - Failure
122+ if : failure() && steps.deployment.outputs.type == 'production'
123+ uses : slackapi/slack-github-action@v1
124+ with :
125+ payload : |
126+ {
127+ "text": "❌ Production deployment failed for superstream-clients-java",
128+ "blocks": [
129+ {
130+ "type": "section",
131+ "text": {
132+ "type": "mrkdwn",
133+ "text": "❌ *Production Deployment Failed*\n*Repository:* ${{ github.repository }}\n*Branch:* ${{ steps.deployment.outputs.branch }}\n*Triggered by:* ${{ github.actor }}\n*Workflow:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
134+ }
135+ }
136+ ]
137+ }
138+ env :
139+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
140+ SLACK_WEBHOOK_TYPE : INCOMING_WEBHOOK
141+
142+ - name : Send Slack Notification - Cancelled
143+ if : cancelled() && steps.deployment.outputs.type == 'production'
144+ uses : slackapi/slack-github-action@v1
145+ with :
146+ payload : |
147+ {
148+ "text": "⚠️ Production deployment was cancelled for superstream-clients-java",
149+ "blocks": [
150+ {
151+ "type": "section",
152+ "text": {
153+ "type": "mrkdwn",
154+ "text": "⚠️ *Production Deployment Cancelled*\n*Repository:* ${{ github.repository }}\n*Branch:* ${{ steps.deployment.outputs.branch }}\n*Triggered by:* ${{ github.actor }}"
155+ }
156+ }
157+ ]
158+ }
159+ env :
160+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
161+ SLACK_WEBHOOK_TYPE : INCOMING_WEBHOOK
101162
0 commit comments