|
9 | 9 | workflow_dispatch: # Manual trigger
|
10 | 10 |
|
11 | 11 | env:
|
12 |
| - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
13 | 12 | DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
|
14 | 13 | COMMIT_OWNER: ${{ github.event.pusher.name }}
|
15 | 14 | COMMIT_SHA: ${{ github.sha }}
|
@@ -209,26 +208,11 @@ jobs:
|
209 | 208 | run: |
|
210 | 209 | echo "Tagging and publishing $REPO@$VERSION release on GitHub."
|
211 | 210 | ./gradlew createGitHubRelease -PnextVersion=$VERSION -Pbranch=$BRANCH -PcreateRelease=true -PgitHubAccessToken=$TOKEN
|
212 |
| - - name: Announce Release on Slack |
213 |
| - id: spring-security-announcing |
214 |
| - |
215 |
| - with: |
216 |
| - payload: | |
217 |
| - { |
218 |
| - "text": "spring-security-announcing `${{ env.VERSION }}` is available now", |
219 |
| - "blocks": [ |
220 |
| - { |
221 |
| - "type": "section", |
222 |
| - "text": { |
223 |
| - "type": "mrkdwn", |
224 |
| - "text": "spring-security-announcing `${{ env.VERSION }}` is available now" |
225 |
| - } |
226 |
| - } |
227 |
| - ] |
228 |
| - } |
| 211 | + - name: Announce Release on GChat |
229 | 212 | env:
|
230 |
| - SLACK_WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_SLACK_WEBHOOK_URL }} |
231 |
| - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |
| 213 | + WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_GCHAT_WEBHOOK_URL }} |
| 214 | + run: | |
| 215 | + curl -X POST '${{ env.WEBHOOK_URL }}' -H 'Content-Type: application/json' -d '{ "text": "spring-security-announcing `${{ env.VERSION }}` is available now" }' || true |
232 | 216 | - name: Setup git config
|
233 | 217 | run: |
|
234 | 218 | git config user.name 'github-actions[bot]'
|
@@ -260,20 +244,13 @@ jobs:
|
260 | 244 | distribution: 'adopt'
|
261 | 245 | - name: Schedule next release (if not already scheduled)
|
262 | 246 | run: ./gradlew scheduleNextRelease -PnextVersion=$VERSION -PgitHubAccessToken=$TOKEN
|
263 |
| - notify_result: |
264 |
| - name: Check for failures |
265 |
| - needs: [perform_release, perform_post_release] |
266 |
| - if: failure() |
| 247 | + send-notification: |
| 248 | + name: Send Notification |
| 249 | + needs: [ perform_release, perform_post_release ] |
| 250 | + if: ${{ failure() || cancelled() }} |
267 | 251 | runs-on: ubuntu-latest
|
268 |
| - permissions: |
269 |
| - actions: read |
270 | 252 | steps:
|
271 |
| - - name: Send Slack message |
272 |
| - # Workaround while waiting for Gamesight/slack-workflow-status#38 to be fixed |
273 |
| - # See https://github.com/Gamesight/slack-workflow-status/issues/38 |
274 |
| - uses: sjohnr/slack-workflow-status@v1-beta |
| 253 | + - name: Send Notification |
| 254 | + uses: spring-io/spring-security-release-tools/.github/actions/send-notification@v1 |
275 | 255 | with:
|
276 |
| - repo_token: ${{ secrets.GITHUB_TOKEN }} |
277 |
| - slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} |
278 |
| - channel: '#spring-security-ci' |
279 |
| - name: 'CI Notifier' |
| 256 | + webhook-url: ${{ secrets.SPRING_SECURITY_CI_GCHAT_WEBHOOK_URL }} |
0 commit comments