@@ -142,7 +142,9 @@ jobs:
142
142
deploy_location=central
143
143
fi
144
144
echo "deploy_location=$deploy_location" >> $GITHUB_OUTPUT
145
- - name : Publish artifacts (Artifactory or staged for Central)
145
+
146
+ - name : Publish Artifacts to Artifactory
147
+ if : ${{ steps.deploy-location.outputs.deploy_location == 'artifactory' }}
146
148
env :
147
149
ORG_GRADLE_PROJECT_signingKey : ${{ secrets.GPG_PRIVATE_KEY }}
148
150
ORG_GRADLE_PROJECT_signingPassword : ${{ secrets.GPG_PASSPHRASE }}
@@ -153,17 +155,45 @@ jobs:
153
155
ARTIFACTORY_USER_AGENT_VERSION : Unknown
154
156
ARTIFACTORY_VCS_REVISION : ${{ github.sha }}
155
157
run : |
156
- ./gradlew publishArtifacts \
158
+ ./gradlew artifactoryPublish \
157
159
--stacktrace \
158
160
-PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD"
159
- - name : Publish staged artifacts to Central
161
+
162
+ - name : Stage Local Artifacts for Publishing to Central
163
+ if : ${{ steps.deploy-location.outputs.deploy_location == 'central' }}
164
+ env :
165
+ ORG_GRADLE_PROJECT_signingKey : ${{ secrets.GPG_PRIVATE_KEY }}
166
+ ORG_GRADLE_PROJECT_signingPassword : ${{ secrets.GPG_PASSPHRASE }}
167
+ run : |
168
+ ./gradlew publishAllPublicationsToLocalRepository --stacktrace
169
+ # rm checksums to work around https://github.com/spring-io/central-publish-action/issues/11
170
+ find -name "*.md5" | xargs rm -f
171
+ find -name "*.sha*" | xargs rm -f
172
+
173
+ - name : Publish Staged Artifacts to Central
160
174
if : ${{ steps.deploy-location.outputs.deploy_location == 'central' }}
161
-
175
+ uses : spring-io/central-publish-action@0cdd90d12e6876341e82860d951e1bcddc1e51b6 # v0.2.0
162
176
with :
163
177
token-name : ${{ secrets.CENTRAL_TOKEN_USERNAME }}
164
178
token : ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
165
179
dir : build/publications/repos
166
- fail-on-existing-checksums : false
180
+
181
+ - name : Still publish docs module to Artifactory when deploy location is Central
182
+ if : ${{ steps.deploy-location.outputs.deploy_location == 'central' }}
183
+ env :
184
+ ORG_GRADLE_PROJECT_signingKey : ${{ secrets.GPG_PRIVATE_KEY }}
185
+ ORG_GRADLE_PROJECT_signingPassword : ${{ secrets.GPG_PASSPHRASE }}
186
+ ARTIFACTORY_BUILD_NAME : ${{ github.event.repository.name }}-${{ steps.branch-name.outputs.branch }}
187
+ ARTIFACTORY_BUILD_NUMBER : ${{ github.run_id }}
188
+ ARTIFACTORY_BUILD_URL : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
189
+ ARTIFACTORY_USER_AGENT_NAME : GitHub Actions
190
+ ARTIFACTORY_USER_AGENT_VERSION : Unknown
191
+ ARTIFACTORY_VCS_REVISION : ${{ github.sha }}
192
+ run : |
193
+ ./gradlew :spring-pulsar-docs:artifactoryPublish \
194
+ --stacktrace \
195
+ -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD"
196
+
167
197
deploy_docs_antora :
168
198
name : Deploy Antora Docs
169
199
needs : [build_jdk_17, check_samples, scan]
0 commit comments