|
82 | 82 | releaseVersion: |
83 | 83 | uses: ./.github/workflows/spring-find-release-version.yml |
84 | 84 |
|
85 | | - staging: |
| 85 | + check-if-no-opened-issues: |
86 | 86 | needs: releaseVersion |
| 87 | + name: Check is no opened issues for ${{ needs.releaseVersion.outputs.releaseVersion }} |
| 88 | + runs-on: ${{ inputs.runner }} |
| 89 | + steps: |
| 90 | + - uses: spring-io/spring-release-actions/count-open-issues@0.0.3 |
| 91 | + id: count-open-issues |
| 92 | + with: |
| 93 | + milestone: ${{ needs.releaseVersion.outputs.releaseVersion }} |
| 94 | + - name: Check if no opened issues |
| 95 | + run: | |
| 96 | + if [[ ${{ steps.count-open-issues.outputs.count }} -gt 0 ]] |
| 97 | + then |
| 98 | + gh run cancel ${{ github.run_id }} |
| 99 | + echo "::warning title=Cannot release::The milestone ${{ steps.find-milestone.outputs.currentVersion }} has opened issues" |
| 100 | + fi |
| 101 | +
|
| 102 | + check-last-snapshot-build: |
| 103 | + needs: check-if-no-opened-issues |
| 104 | + name: Check the last SNAPSHOT build for ${{ needs.releaseVersion.outputs.releaseVersion }} |
| 105 | + runs-on: ${{ inputs.runner }} |
| 106 | + steps: |
| 107 | + - name: Check the last SNAPSHOT build is green |
| 108 | + run: | |
| 109 | + LAST_SNAPSHOT_BUILD_STATUS=$(gh run list -R ${{ github.repository }} -b ${{ github.ref_name }} -L 1 -w ci-snapshot.yml --json conclusion --jq .[0].conclusion) |
| 110 | + if [[ $LAST_SNAPSHOT_BUILD_STATUS != 'success' ]] |
| 111 | + then |
| 112 | + gh run cancel ${{ github.run_id }} |
| 113 | + echo "::warning title=Cannot release::The last SNAPSHOT build for milestone ${{ steps.find-milestone.outputs.currentVersion }} has not passed" |
| 114 | + fi |
| 115 | +
|
| 116 | + staging: |
| 117 | + needs: check-last-snapshot-build |
87 | 118 | name: Stage ${{ needs.releaseVersion.outputs.releaseVersion }} |
88 | 119 | uses: ./.github/workflows/spring-artifactory-gradle-build.yml |
89 | 120 | with: |
@@ -159,8 +190,37 @@ jobs: |
159 | 190 | finalize: |
160 | 191 | if: ${{ !(failure() || cancelled()) }} |
161 | 192 | needs: [ releaseVersion, deploy-to-central, spring-release-bundle ] |
162 | | - name: Finalize ${{ needs.releaseVersion.outputs.releaseVersion }} |
| 193 | + name: Finalize ${{ needs.releaseVersion.outputs.releaseVersion }} release |
163 | 194 | uses: ./.github/workflows/spring-finalize-release.yml |
164 | 195 | with: |
165 | 196 | milestone: ${{ needs.releaseVersion.outputs.releaseVersion }} |
166 | 197 | secrets: inherit |
| 198 | + |
| 199 | + post-release: |
| 200 | + if: ${{ !(failure() || cancelled()) }} |
| 201 | + needs: [ releaseVersion, finalize ] |
| 202 | + name: Post-procedure for ${{ needs.releaseVersion.outputs.releaseVersion }} release |
| 203 | + runs-on: ${{ inputs.runner }} |
| 204 | + steps: |
| 205 | + - name: Checkout Common Repo |
| 206 | + uses: actions/checkout@v6 |
| 207 | + with: |
| 208 | + repository: spring-io/spring-github-workflows |
| 209 | + path: .github/spring-github-workflows |
| 210 | + show-progress: false |
| 211 | + ref: ${{ env.WORKFLOWS_REF }} |
| 212 | + |
| 213 | + - name: Update Spring IO website for new version |
| 214 | + uses: ./.github/spring-github-workflows/.github/actions/spring-website-project-version-update |
| 215 | + with: |
| 216 | + newVersion: ${{ needs.releaseVersion.outputs.releaseVersion }} |
| 217 | + token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} |
| 218 | + |
| 219 | + - name: Announce Release in Chat |
| 220 | + if: env.CHAT_WEBHOOK_URL |
| 221 | + uses: spring-io/spring-release-actions/announce-on-gchat@0.0.3 |
| 222 | + with: |
| 223 | + gchat-webhook-url: ${{ env.CHAT_WEBHOOK_URL }} |
| 224 | + version: ${{ needs.releaseVersion.outputs.releaseVersion }} |
| 225 | + env: |
| 226 | + CHAT_WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_CHAT_WEBHOOK_URL }} |
0 commit comments