Skip to content

Commit 36c2e67

Browse files
committed
Deploy jar individually to avoid 413 error
1 parent e53f403 commit 36c2e67

File tree

2 files changed

+27
-13
lines changed

2 files changed

+27
-13
lines changed

.github/workflows/presto-release-publish.yml

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3021,7 +3021,7 @@
30213021
<extensions>true</extensions>
30223022
<configuration>
30233023
<publishingServerId>ossrh</publishingServerId>
3024-
<autoPublish>true</autoPublish>
3024+
<autoPublish>false</autoPublish>
30253025
<waitUntil>validated</waitUntil>
30263026
</configuration>
30273027
</plugin>

0 commit comments

Comments
 (0)