Skip to content

Commit

Permalink
Use actions/spring-dispatch-workflow-and-wait for Maven release
Browse files Browse the repository at this point in the history
* Mention in the `README.md` that promote to Maven Central is optional
  • Loading branch information
artembilan committed Aug 28, 2024
1 parent 13bdf49 commit e199d14
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/spring-artifactory-maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,24 @@ jobs:
name: Verify ${{ needs.releaseVersion.outputs.releaseVersion }}
runs-on: ${{ inputs.runner }}
steps:
- uses: actions/checkout@v4
with:
show-progress: false

- name: Checkout Common Repo
uses: actions/checkout@v4
with:
repository: spring-io/spring-github-workflows
path: spring-github-workflows
show-progress: false
ref: ${{ env.WORKFLOWS_REF }}

- name: Call smoke tests workflow
uses: aurelien-baudet/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7
- name: Dispatch Workflow
timeout-minutes: 30
uses: ./spring-github-workflows/.github/actions/spring-dispatch-workflow-and-wait
with:
workflow: ${{ inputs.verifyStagedWorkflow }}
wait-for-completion-interval: 30s
display-workflow-run-url-interval: 5s
# workflow-logs: print - uncomment when v3 for action is released
token: ${{ env.GH_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
inputs: '{ "releaseVersion": "${{ needs.releaseVersion.outputs.releaseVersion }}" }'

promote-milestone:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ GPG_PRIVATE_KEY

The Gradle Enterprise secrets are optional: not used by Maven and Gradle project might not be enrolled for the service.
The `SPRING_RELEASE_CHAT_WEBHOOK_URL` secret is also optional: probably you don't want to notify Google Space about your release, or it is not available for GitHub organization.
As well as `OSSRH_*` secret, since not all releases might go to Maven Central, e.g. private (commercial) repositories only.

The mentioned secrets must be passed explicitly since these reusable workflows might be in different GitHub org than target project.

Expand Down Expand Up @@ -75,7 +76,7 @@ The composite internal [extract-release-version](.github/actions/extract-release
- Call Maven or Gradle (according to the workflow choice for the project in the repository) with the release version extracted from the previous job.
This job stages released artifacts using JFrog Artifactory plugin into `libs-staging-local` repository on Spring Artifactory and commits `Next development version` to the branch we are releasing against
- The next job is to [verify staged artifacts](#verify-staged-artifacts)
- When verification is successful, next job promotes release from staging either to `libs-milestone-local` or `libs-release-local` (by default) (and Maven Central) according to the releasing version schema
- When verification is successful, next job promotes release from staging either to `libs-milestone-local` or `libs-release-local` (by default) (and optional to Maven Central: if `OSSRH_STAGING_PROFILE_NAME` secret is provided) according to the releasing version schema
- Then [spring-finalize-release.yml](.github/workflows/spring-finalize-release.yml) job is executed, which generates release notes using [Spring Changelog Generator](https://github.com/spring-io/github-changelog-generator) excluding repository admins from `Contributors` section.
The `gh release create` command is performed on a tag for just released version.
And in the end the milestone is closed and specific Google Space is notified about release (if `SPRING_RELEASE_CHAT_WEBHOOK_URL` secret is present in the repository).
Expand Down

0 comments on commit e199d14

Please sign in to comment.