@@ -127,21 +127,28 @@ jobs:
127127 fi
128128 echo "deploy_location=$deploy_location" >> $GITHUB_OUTPUT
129129
130- - name : Publish Artifacts to Artifactory
130+ - name : Stage Local Artifacts for Publishing to Artifactory
131131 if : ${{ steps.deploy-location.outputs.deploy_location == 'artifactory' }}
132132 env :
133133 ORG_GRADLE_PROJECT_signingKey : ${{ secrets.GPG_PRIVATE_KEY }}
134134 ORG_GRADLE_PROJECT_signingPassword : ${{ secrets.GPG_PASSPHRASE }}
135- ARTIFACTORY_BUILD_NAME : ${{ github.event.repository.name }}-${{ steps.branch-name.outputs.branch }}
136- ARTIFACTORY_BUILD_NUMBER : ${{ github.run_id }}
137- ARTIFACTORY_BUILD_URL : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
138- ARTIFACTORY_USER_AGENT_NAME : GitHub Actions
139- ARTIFACTORY_USER_AGENT_VERSION : Unknown
140- ARTIFACTORY_VCS_REVISION : ${{ github.sha }}
141135 run : |
142- ./gradlew artifactoryPublish \
143- --stacktrace \
144- -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD"
136+ shell : bash
137+ ./gradlew -PdeploymentRepository=$(pwd)/deployment-repository publishAllPublicationsToDeploymentRepository
138+ - name : Publish Staged Artifacts to Artifactory
139+ if : ${{ steps.deploy-location.outputs.deploy_location == 'artifactory' }}
140+ uses : spring-io/artifactory-deploy-action@dc1913008c0599f0c4b1fdafb6ff3c502b3565ea # v0.0.2
141+ with :
142+ artifact-properties : |
143+ /**/*docs-*.zip::zip.name=spring-pulsar,zip.type=docs,zip.deployed=false
144+ uri : ' https://repo.spring.io'
145+ repository : ' libs-snapshot-local'
146+ build-name : ' spring-pulsar-2.0.x'
147+ folder : ' deployment-repository'
148+ signing-key : ${{ secrets.GPG_PRIVATE_KEY }}
149+ signing-passphrase : ${{ secrets.GPG_PASSPHRASE }}
150+ username : ${{ secrets.ARTIFACTORY_USERNAME }}
151+ password : ${{ secrets.ARTIFACTORY_PASSWORD }}
145152
146153 - name : Stage Local Artifacts for Publishing to Central
147154 if : ${{ steps.deploy-location.outputs.deploy_location == 'central' }}
@@ -153,7 +160,6 @@ jobs:
153160 # rm checksums to work around https://github.com/spring-io/central-publish-action/issues/11
154161 find -name "*.md5" | xargs rm -f
155162 find -name "*.sha*" | xargs rm -f
156-
157163 - name : Publish Staged Artifacts to Central
158164 if : ${{ steps.deploy-location.outputs.deploy_location == 'central' }}
159165 uses : spring-io/central-publish-action@0c03960e9b16fdfe70e2443e1d5393cbc3a35622 # v0.3.0
@@ -162,21 +168,28 @@ jobs:
162168 token : ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
163169 dir : build/publications/repos
164170
165- - name : Still publish docs module to Artifactory when deploy location is Central
171+ - name : Still publish docs module to Artifactory when deploy location is Central (stage)
166172 if : ${{ steps.deploy-location.outputs.deploy_location == 'central' }}
167173 env :
168174 ORG_GRADLE_PROJECT_signingKey : ${{ secrets.GPG_PRIVATE_KEY }}
169175 ORG_GRADLE_PROJECT_signingPassword : ${{ secrets.GPG_PASSPHRASE }}
170- ARTIFACTORY_BUILD_NAME : ${{ github.event.repository.name }}-${{ steps.branch-name.outputs.branch }}
171- ARTIFACTORY_BUILD_NUMBER : ${{ github.run_id }}
172- ARTIFACTORY_BUILD_URL : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
173- ARTIFACTORY_USER_AGENT_NAME : GitHub Actions
174- ARTIFACTORY_USER_AGENT_VERSION : Unknown
175- ARTIFACTORY_VCS_REVISION : ${{ github.sha }}
176176 run : |
177- ./gradlew :spring-pulsar-docs:artifactoryPublish \
178- --stacktrace \
179- -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD"
177+ shell : bash
178+ ./gradlew -PdeploymentRepository=$(pwd)/deployment-repository :spring-pulsar-docs:publishAllPublicationsToDeploymentRepository
179+ - name : Still publish docs module to Artifactory when deploy location is Central (publish)
180+ if : ${{ steps.deploy-location.outputs.deploy_location == 'central' }}
181+ uses : spring-io/artifactory-deploy-action@dc1913008c0599f0c4b1fdafb6ff3c502b3565ea # v0.0.2
182+ with :
183+ artifact-properties : |
184+ /**/*docs-*.zip::zip.name=spring-pulsar,zip.type=docs,zip.deployed=false
185+ uri : ' https://repo.spring.io'
186+ repository : ' libs-release-local'
187+ build-name : ' spring-pulsar-2.0.x'
188+ folder : ' deployment-repository'
189+ signing-key : ${{ secrets.GPG_PRIVATE_KEY }}
190+ signing-passphrase : ${{ secrets.GPG_PASSPHRASE }}
191+ username : ${{ secrets.ARTIFACTORY_USERNAME }}
192+ password : ${{ secrets.ARTIFACTORY_PASSWORD }}
180193
181194 deploy_docs_antora :
182195 name : Deploy Antora Docs
0 commit comments