|
@@ -209,11 +209,26 @@ jobs:
|
|
run: |
|
|
run: |
|
|
echo "Tagging and publishing $REPO@$VERSION release on GitHub."
|
|
echo "Tagging and publishing $REPO@$VERSION release on GitHub."
|
|
./gradlew createGitHubRelease -PnextVersion=$VERSION -Pbranch=$BRANCH -PcreateRelease=true -PgitHubAccessToken=$TOKEN
|
|
./gradlew createGitHubRelease -PnextVersion=$VERSION -Pbranch=$BRANCH -PcreateRelease=true -PgitHubAccessToken=$TOKEN
|
|
- - name: Announce Release on GChat
|
|
|
|
|
|
+ - name: Announce Release on Slack
|
|
|
|
+ id: spring-security-announcing
|
|
|
|
+ uses: slackapi/slack-github-action@v1.26.0
|
|
|
|
+ with:
|
|
|
|
+ payload: |
|
|
|
|
+ {
|
|
|
|
+ "text": "spring-security-announcing `${{ env.VERSION }}` is available now",
|
|
|
|
+ "blocks": [
|
|
|
|
+ {
|
|
|
|
+ "type": "section",
|
|
|
|
+ "text": {
|
|
|
|
+ "type": "mrkdwn",
|
|
|
|
+ "text": "spring-security-announcing `${{ env.VERSION }}` is available now"
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
env:
|
|
env:
|
|
- WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_GCHAT_WEBHOOK_URL }}
|
|
|
|
- run: |
|
|
|
|
- curl -X POST '$WEBHOOK_URL' -H 'Content-Type: application/json' -d '{ text: "spring-security-announcing `$VERSION` is available now" }' || true
|
|
|
|
|
|
+ SLACK_WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_SLACK_WEBHOOK_URL }}
|
|
|
|
+ SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
|
- name: Setup git config
|
|
- name: Setup git config
|
|
run: |
|
|
run: |
|
|
git config user.name 'github-actions[bot]'
|
|
git config user.name 'github-actions[bot]'
|
|
@@ -245,16 +260,20 @@ jobs:
|
|
distribution: 'adopt'
|
|
distribution: 'adopt'
|
|
- name: Schedule next release (if not already scheduled)
|
|
- name: Schedule next release (if not already scheduled)
|
|
run: ./gradlew scheduleNextRelease -PnextVersion=$VERSION -PgitHubAccessToken=$TOKEN
|
|
run: ./gradlew scheduleNextRelease -PnextVersion=$VERSION -PgitHubAccessToken=$TOKEN
|
|
- send-notification:
|
|
|
|
- name: Send Notification
|
|
|
|
- needs: [ perform_release, perform_post_release ]
|
|
|
|
|
|
+ notify_result:
|
|
|
|
+ name: Check for failures
|
|
|
|
+ needs: [perform_release, perform_post_release]
|
|
if: failure()
|
|
if: failure()
|
|
runs-on: ubuntu-latest
|
|
runs-on: ubuntu-latest
|
|
|
|
+ permissions:
|
|
|
|
+ actions: read
|
|
steps:
|
|
steps:
|
|
- - name: Send Notification
|
|
|
|
- uses: spring-io/spring-security-release-tools/.github/actions/send-notification@v1
|
|
|
|
|
|
+ - name: Send Slack message
|
|
|
|
+ # Workaround while waiting for Gamesight/slack-workflow-status#38 to be fixed
|
|
|
|
+ # See https://github.com/Gamesight/slack-workflow-status/issues/38
|
|
|
|
+ uses: sjohnr/slack-workflow-status@v1-beta
|
|
with:
|
|
with:
|
|
- webhook-url: ${{ secrets.SPRING_SECURITY_CI_GCHAT_WEBHOOK_URL }}
|
|
|
|
- status: ${{ job.status }}
|
|
|
|
- build-scan-url: ${{ steps.build-and-publish.outputs.build-scan-url }}
|
|
|
|
- run-name: ${{ format('spring-security/{0}', github.ref_name) }}
|
|
|
|
|
|
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
+ slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
|
|
+ channel: '#spring-security-ci'
|
|
|
|
+ name: 'CI Notifier'
|