|
| 1 | +name: Release |
| 2 | +on: |
| 3 | + push: |
| 4 | + tags: |
| 5 | + - v3.0.[0-9]+ |
| 6 | +concurrency: |
| 7 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 8 | +jobs: |
| 9 | + build-and-stage-release: |
| 10 | + name: Build and Stage Release |
| 11 | + if: ${{ github.repository == 'spring-projects/spring-webflow' }} |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - name: Check Out Code |
| 15 | + uses: actions/checkout@v4 |
| 16 | + - name: Build and Publish |
| 17 | + id: build-and-publish |
| 18 | + uses: ./.github/actions/build |
| 19 | + with: |
| 20 | + develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} |
| 21 | + opensource-repository-password: ${{ secrets.ARTIFACTORY_PASSWORD }} |
| 22 | + opensource-repository-username: ${{ secrets.ARTIFACTORY_USERNAME }} |
| 23 | + publish: true |
| 24 | + - name: Stage Release |
| 25 | + uses: spring-io/artifactory-deploy-action@26bbe925a75f4f863e1e529e85be2d0093cac116 # v0.0.1 |
| 26 | + with: |
| 27 | + artifact-properties: | |
| 28 | + /**/webflow-*.zip::zip.name=spring-webflow,zip.deployed=false |
| 29 | + /**/webflow-*-docs.zip::zip.type=docs |
| 30 | + /**/webflow-*-dist.zip::zip.type=dist |
| 31 | + /**/webflow-*-schema.zip::zip.type=schema |
| 32 | + build-name: ${{ format('spring-webflow-{0}', steps.build-and-publish.outputs.version)}} |
| 33 | + folder: 'deployment-repository' |
| 34 | + password: ${{ secrets.ARTIFACTORY_PASSWORD }} |
| 35 | + repository: 'libs-staging-local' |
| 36 | + signing-key: ${{ secrets.GPG_PRIVATE_KEY }} |
| 37 | + signing-passphrase: ${{ secrets.GPG_PASSPHRASE }} |
| 38 | + uri: 'https://repo.spring.io' |
| 39 | + username: ${{ secrets.ARTIFACTORY_USERNAME }} |
| 40 | + outputs: |
| 41 | + version: ${{ steps.build-and-publish.outputs.version }} |
| 42 | + sync-to-maven-central: |
| 43 | + name: Sync to Maven Central |
| 44 | + needs: |
| 45 | + - build-and-stage-release |
| 46 | + runs-on: ubuntu-latest |
| 47 | + steps: |
| 48 | + - name: Check Out Code |
| 49 | + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
| 50 | + - name: Sync to Maven Central |
| 51 | + uses: ./.github/actions/sync-to-maven-central |
| 52 | + with: |
| 53 | + jfrog-cli-config-token: ${{ secrets.JF_ARTIFACTORY_SPRING }} |
| 54 | + ossrh-s01-staging-profile: ${{ secrets.OSSRH_S01_STAGING_PROFILE }} |
| 55 | + ossrh-s01-token-password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }} |
| 56 | + ossrh-s01-token-username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }} |
| 57 | + spring-webflow-version: ${{ needs.build-and-stage-release.outputs.version }} |
| 58 | + promote-release: |
| 59 | + name: Promote Release |
| 60 | + needs: |
| 61 | + - build-and-stage-release |
| 62 | + - sync-to-maven-central |
| 63 | + runs-on: ubuntu-latest |
| 64 | + steps: |
| 65 | + - name: Set up JFrog CLI |
| 66 | + uses: jfrog/setup-jfrog-cli@9fe0f98bd45b19e6e931d457f4e98f8f84461fb5 # v4.4.1 |
| 67 | + env: |
| 68 | + JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} |
| 69 | + - name: Promote build |
| 70 | + run: jfrog rt build-promote ${{ format('spring-webflow-{0}', needs.build-and-stage-release.outputs.version)}} ${{ github.run_number }} libs-release-local |
| 71 | + create-github-release: |
| 72 | + name: Create GitHub Release |
| 73 | + needs: |
| 74 | + - build-and-stage-release |
| 75 | + - promote-release |
| 76 | + runs-on: ubuntu-latest |
| 77 | + steps: |
| 78 | + - name: Check Out Code |
| 79 | + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
| 80 | + - name: Create GitHub Release |
| 81 | + uses: ./.github/actions/create-github-release |
| 82 | + with: |
| 83 | + milestone: ${{ needs.build-and-stage-release.outputs.version }} |
| 84 | + token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} |
0 commit comments