1616 - name : Bump version
1717 id : bump_version
1818 run : echo "::set-output name=version::$(ruby .github/version.rb ${{ github.event.client_payload.version }})"
19-
2019 - name : Clean repo
2120 run : ruby .github/clean.rb
22-
2321 - name : Install openapi-generator-cli
2422 run : |
2523 npm install @openapitools/openapi-generator-cli -g
3028 -g java \
3129 -c ./openapi/config.yml \
3230 -t ./openapi/templates
33-
3431 - name : Checkout master
3532 run : git checkout master
36-
3733 - name : Create commit
3834 run : |
3935 git config user.name "devexperience"
@@ -42,11 +38,22 @@ jobs:
4238 git commit -m "Generated version ${{ steps.bump_version.outputs.version }}
4339
4440 This commit was automatically created by a GitHub Action to generate version ${{ steps.bump_version.outputs.version }} of this library."
45-
4641 - name : Push to master
4742 run : git push origin master
4843 env :
4944 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45+ - name : Slack notification
46+ uses : ravsamhq/notify-slack-action@v2
47+ if : always()
48+ with :
49+ status : ${{ job.status }}
50+ token : ${{ secrets.GITHUB_TOKEN }}
51+ notification_title : " {repo}: {workflow} workflow"
52+ message_format : " {emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>"
53+ footer : " <{workflow_url}|View Workflow>"
54+ notify_when : " failure"
55+ env :
56+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
5057 Publish :
5158 runs-on : ubuntu-latest
5259 steps :
5663 with :
5764 distribution : ' temurin'
5865 java-version : ' 11'
59-
6066 - name : Build with Maven
6167 run : mvn -B package --file pom.xml
62-
6368 - name : Set up Apache Maven Central
6469 uses : actions/setup-java@v2
6570 with :
@@ -70,13 +75,24 @@ jobs:
7075 server-password : MAVEN_CENTRAL_TOKEN
7176 gpg-private-key : ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
7277 gpg-passphrase : MAVEN_GPG_PASSPHRASE
73-
7478 - name : Publish to Apache Maven Central
7579 run : mvn deploy -P sign-artifacts
7680 env :
7781 MAVEN_USERNAME : ${{ secrets.MAVEN_USERNAME }}
7882 MAVEN_CENTRAL_TOKEN : ${{ secrets.MAVEN_CENTRAL_TOKEN }}
7983 MAVEN_GPG_PASSPHRASE : ${{ secrets.MAVEN_GPG_PASSPHRASE }}
84+ - name : Slack notification
85+ uses : ravsamhq/notify-slack-action@v2
86+ if : always()
87+ with :
88+ status : ${{ job.status }}
89+ token : ${{ secrets.GITHUB_TOKEN }}
90+ notification_title : " {repo}: {workflow} workflow"
91+ message_format : " {emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>"
92+ footer : " <{workflow_url}|View Workflow>"
93+ notify_when : " failure"
94+ env :
95+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
8096 Release :
8197 runs-on : ubuntu-latest
8298 steps :
@@ -94,3 +110,15 @@ jobs:
94110 gh release create "v${{ steps.read_version.outputs.version }}"
95111 env :
96112 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
113+ - name : Slack notification
114+ uses : ravsamhq/notify-slack-action@v2
115+ if : always()
116+ with :
117+ status : ${{ job.status }}
118+ token : ${{ secrets.GITHUB_TOKEN }}
119+ notification_title : " {repo}: {workflow} workflow"
120+ message_format : " {emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>"
121+ footer : " <{workflow_url}|View Workflow>"
122+ notify_when : " failure"
123+ env :
124+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
0 commit comments