|
9 | 9 | workflow_dispatch: # Manual trigger |
10 | 10 |
|
11 | 11 | env: |
12 | | - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
13 | 12 | GRADLE_ENTERPRISE_CACHE_USER: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }} |
14 | 13 | GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} |
15 | 14 | GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} |
@@ -241,26 +240,11 @@ jobs: |
241 | 240 | export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY" |
242 | 241 | echo "Tagging and publishing $REPO@$VERSION release on GitHub." |
243 | 242 | ./gradlew createGitHubRelease -PnextVersion=$VERSION -Pbranch=$BRANCH -PcreateRelease=true -PgitHubAccessToken=$TOKEN |
244 | | - - name: Announce Release on Slack |
245 | | - id: spring-security-announcing |
246 | | - |
247 | | - with: |
248 | | - payload: | |
249 | | - { |
250 | | - "text": "spring-security-announcing `${{ env.VERSION }}` is available now", |
251 | | - "blocks": [ |
252 | | - { |
253 | | - "type": "section", |
254 | | - "text": { |
255 | | - "type": "mrkdwn", |
256 | | - "text": "spring-security-announcing `${{ env.VERSION }}` is available now" |
257 | | - } |
258 | | - } |
259 | | - ] |
260 | | - } |
| 243 | + - name: Announce Release on GChat |
261 | 244 | env: |
262 | | - SLACK_WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_SLACK_WEBHOOK_URL }} |
263 | | - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |
| 245 | + WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_GCHAT_WEBHOOK_URL }} |
| 246 | + run: | |
| 247 | + curl -X POST '${{ env.WEBHOOK_URL }}' -H 'Content-Type: application/json' -d '{ "text": "spring-security-announcing `${{ env.VERSION }}` is available now" }' || true |
264 | 248 | - name: Setup git config |
265 | 249 | run: | |
266 | 250 | git config user.name 'github-actions[bot]' |
@@ -295,20 +279,13 @@ jobs: |
295 | 279 | distribution: 'adopt' |
296 | 280 | - name: Schedule next release (if not already scheduled) |
297 | 281 | run: ./gradlew scheduleNextRelease -PnextVersion=$VERSION -PgitHubAccessToken=$TOKEN |
298 | | - notify_result: |
299 | | - name: Check for failures |
300 | | - needs: [perform_release, perform_post_release] |
301 | | - if: failure() |
| 282 | + send-notification: |
| 283 | + name: Send Notification |
| 284 | + needs: [ perform_release, perform_post_release ] |
| 285 | + if: ${{ failure() || cancelled() }} |
302 | 286 | runs-on: ubuntu-latest |
303 | | - permissions: |
304 | | - actions: read |
305 | 287 | steps: |
306 | | - - name: Send Slack message |
307 | | - # Workaround while waiting for Gamesight/slack-workflow-status#38 to be fixed |
308 | | - # See https://github.com/Gamesight/slack-workflow-status/issues/38 |
309 | | - uses: sjohnr/slack-workflow-status@v1-beta |
| 288 | + - name: Send Notification |
| 289 | + uses: spring-io/spring-security-release-tools/.github/actions/send-notification@v1 |
310 | 290 | with: |
311 | | - repo_token: ${{ secrets.GITHUB_TOKEN }} |
312 | | - slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} |
313 | | - channel: '#spring-security-ci' |
314 | | - name: 'CI Notifier' |
| 291 | + webhook-url: ${{ secrets.SPRING_SECURITY_CI_GCHAT_WEBHOOK_URL }} |
0 commit comments