Skip to content

Commit 15f0488

Browse files
committed
Publish milestones on Maven Central
This commit adapts the release pipeline to publish milestones on both our milestone repository and Maven Central. To make sure users can consume everything without the need of an extra repository, this commit also publishes the Gradle plugin to the Gradle Plugin Portal. Closes gh-46024
1 parent 52becac commit 15f0488

File tree

1 file changed

+37
-2
lines changed

1 file changed

+37
-2
lines changed

.github/workflows/release-milestone.yml

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,28 @@ jobs:
5050
with:
5151
staging: true
5252
version: ${{ needs.build-and-stage-release.outputs.version }}
53+
sync-to-maven-central:
54+
name: Sync to Maven Central
55+
if: ${{ !vars.COMMERCIAL }}
56+
needs:
57+
- build-and-stage-release
58+
- verify
59+
runs-on: ${{ vars.UBUNTU_SMALL || 'ubuntu-latest' }}
60+
steps:
61+
- name: Check Out Code
62+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
63+
- name: Sync to Maven Central
64+
uses: ./.github/actions/sync-to-maven-central
65+
with:
66+
central-token-password: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
67+
central-token-username: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
68+
jfrog-cli-config-token: ${{ secrets.JF_ARTIFACTORY_SPRING }}
69+
spring-boot-version: ${{ needs.build-and-stage-release.outputs.version }}
5370
promote-release:
5471
name: Promote Release
5572
needs:
5673
- build-and-stage-release
57-
- verify
74+
- sync-to-maven-central
5875
runs-on: ${{ vars.UBUNTU_SMALL || 'ubuntu-latest' }}
5976
steps:
6077
- name: Set up JFrog CLI
@@ -63,11 +80,28 @@ jobs:
6380
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
6481
- name: Promote build
6582
run: jfrog rt build-promote ${{ format('spring-boot-{0}', needs.build-and-stage-release.outputs.version)}} ${{ github.run_number }} libs-milestone-local
83+
publish-gradle-plugin:
84+
name: Publish Gradle Plugin
85+
if: ${{ !vars.COMMERCIAL }}
86+
needs:
87+
- build-and-stage-release
88+
- sync-to-maven-central
89+
runs-on: ${{ vars.UBUNTU_SMALL || 'ubuntu-latest' }}
90+
steps:
91+
- name: Check Out Code
92+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
93+
- name: Publish
94+
uses: ./.github/actions/publish-gradle-plugin
95+
with:
96+
gradle-plugin-publish-key: ${{ secrets.GRADLE_PLUGIN_PUBLISH_KEY }}
97+
gradle-plugin-publish-secret: ${{ secrets.GRADLE_PLUGIN_PUBLISH_SECRET }}
98+
jfrog-cli-config-token: ${{ secrets.JF_ARTIFACTORY_SPRING }}
99+
plugin-version: ${{ needs.build-and-stage-release.outputs.version }}
66100
trigger-docs-build:
67101
name: Trigger Docs Build
68102
needs:
69103
- build-and-stage-release
70-
- verify
104+
- sync-to-maven-central
71105
permissions:
72106
actions: write
73107
runs-on: ubuntu-latest
@@ -81,6 +115,7 @@ jobs:
81115
needs:
82116
- build-and-stage-release
83117
- promote-release
118+
- publish-gradle-plugin
84119
- trigger-docs-build
85120
runs-on: ${{ vars.UBUNTU_SMALL || 'ubuntu-latest' }}
86121
steps:

0 commit comments

Comments
 (0)