@@ -212,18 +212,32 @@ jobs:
212212 GPG_PASSPHRASE : " ${{ secrets.GPG_PASSPHRASE }}"
213213 run : |
214214 unset MAVEN_CONFIG
215- ./mvnw -s ${{ github.workspace }}/settings.xml -V -B -U -e -T1C deploy \
216- -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" \
217- -Dmaven.wagon.http.retryHandler.count=8 \
218- -DskipTests \
219- -DstagingProfileId="${{ secrets.MAVEN_STAGING_PROFILE_ID }}" \
220- -DkeepStagingRepositoryOnFailure=true \
221- -DkeepStagingRepositoryOnCloseRuleFailure=true \
222- -DautoReleaseAfterClose=true \
223- -DstagingProgressTimeoutMinutes=60 \
224- -Poss-release \
225- -Pdeploy-to-ossrh \
226- -pl '!presto-test-coverage'
215+ modules=$(find . -maxdepth 1 -type d \( ! -name . \) -exec test -f '{}/pom.xml' \; -print | sed 's|^./||')
216+ for module in $modules; do
217+ if [ "$module" = "presto-test-coverage" ]; then
218+ echo "Skipping $module"
219+ continue
220+ fi
221+ MODULE_PATH=$(awk -F'[<>]' '/^ <groupId>/ {print $3; exit}' "$module/pom.xml" | sed 's|\.|/|g' | sed 's|^com/facebook/presto||')
222+ echo "Checking https://repo1.maven.org/maven2/com/facebook/presto${MODULE_PATH}/${module}/${RELEASE_TAG}"
223+ if ! curl --silent --fail "https://repo1.maven.org/maven2/com/facebook/presto${MODULE_PATH}/${module}/${RELEASE_TAG}" > /dev/null; then
224+ echo "Publishing ${module}"
225+ ./mvnw -s ${{ github.workspace }}/settings.xml -V -B -U -e -T1C deploy \
226+ -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" \
227+ -Dmaven.wagon.http.retryHandler.count=8 \
228+ -DskipTests \
229+ -DstagingProfileId="${{ secrets.MAVEN_STAGING_PROFILE_ID }}" \
230+ -DkeepStagingRepositoryOnFailure=true \
231+ -DkeepStagingRepositoryOnCloseRuleFailure=true \
232+ -DautoReleaseAfterClose=true \
233+ -DstagingProgressTimeoutMinutes=60 \
234+ -Poss-release \
235+ -Pdeploy-to-ossrh \
236+ -pl "$module"
237+ else
238+ echo "${module} ${RELEASE_TAG} already published, skipping."
239+ fi
240+ done
227241
228242 publish-docker-image :
229243 needs : publish-maven-artifacts
0 commit comments