@@ -77,48 +77,45 @@ jobs:
7777 if [[ "$deploy_location" = "true" ]] ; then
7878 if [[ "$VERSION" =~ "-SNAPSHOT" ]] ; then
7979 # always default -SNAPSHOT to artifactory
80- deploy_location=artifactory
80+ deploy_location=libs-snapshot-local
8181 elif [[ "$DEFAULT_PUBLISH_MILESTONE_CENTRAL" = "true" ]] ; then
8282 # if configured, non -SNAPSHOT go to central
8383 deploy_location=central
8484 elif [[ "$VERSION" =~ "-" ]] ; then
8585 # -M\d+, and -RC\d+ all go to artifactory by default to remain passive
8686 # Newer generations will only deploy -SNAPSHOT to artifactory, but they must specify default-publish-milestone-central=true
87- deploy_location=artifactory
87+ deploy_location=libs-milestone-local
8888 else
8989 deploy_location=central
9090 fi
9191 fi
9292 echo "deploy_location=$deploy_location" >> $GITHUB_OUTPUT
93- - name : Deploy to Artifactory
94- if : ${{ steps.deploy-location.outputs.deploy_location == 'artifactory' }}
95- env :
96- ORG_GRADLE_PROJECT_signingKey : ${{ secrets.GPG_PRIVATE_KEY }}
97- ORG_GRADLE_PROJECT_signingPassword : ${{ secrets.GPG_PASSPHRASE }}
98- ARTIFACTORY_BUILD_NAME : ${{ github.event.repository.name }}-${{ steps.branch-name.outputs.branch }}
99- ARTIFACTORY_BUILD_NUMBER : ${{ github.run_id }}
100- ARTIFACTORY_BUILD_URL : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
101- ARTIFACTORY_USER_AGENT_NAME : GitHub Actions
102- ARTIFACTORY_USER_AGENT_VERSION : Unknown
103- ARTIFACTORY_VCS_REVISION : ${{ github.sha }}
104- run : ./gradlew artifactoryPublish -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" --stacktrace
10593 - name : Stage Local Artifacts for Publishing to Central
106- if : ${{ steps.deploy-location.outputs.deploy_location == 'central' }}
10794 env :
10895 ORG_GRADLE_PROJECT_signingKey : ${{ secrets.GPG_PRIVATE_KEY }}
10996 ORG_GRADLE_PROJECT_signingPassword : ${{ secrets.GPG_PASSPHRASE }}
11097 run : |
11198 ./gradlew publishAllPublicationsToLocalRepository --stacktrace
112- # rm checksums to work around https://github.com/spring-io/central-publish-action/issues/11
113- find -name "*.md5" | xargs rm -f
114- find -name "*.sha*" | xargs rm -f
99+ - name : Deploy to Artifactory
100+ if : ${{ steps.deploy-location.outputs.deploy_location != 'artifactory' }}
101+ 102+ with :
103+ uri : " https://repo.spring.io"
104+ repository : ${{ steps.deploy-location.outputs.deploy_location }}
105+ build-name : ${{ github.event.repository.name }}-${{ steps.branch-name.outputs.branch }}
106+ build-uri : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
107+ username : ${{ secrets.ARTIFACTORY_USERNAME }}
108+ password : ${{ secrets.ARTIFACTORY_PASSWORD }}
109+ vcs-revision : ${{ github.sha }}
110+ folder : build/publications/repos
115111 - name : Publish Staged Artifacts to Central
116112 if : ${{ steps.deploy-location.outputs.deploy_location == 'central' }}
117113118114 with :
119115 token-name : ${{ secrets.CENTRAL_TOKEN_USERNAME }}
120116 token : ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
121117 dir : build/publications/repos
118+ fail-on-existing-checksums : false
122119 - id : artifacts-deployed
123120 name : Artifacts Deployed
124121 run : echo "result=true" >> $GITHUB_OUTPUT
0 commit comments