File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -109,13 +109,15 @@ jobs:
109109 echo "IS_SNAPSHOT_VERSION=$IS_SNAPSHOT_VERSION" >> $GITHUB_ENV
110110 - name : Publish to Sonatype Nexus
111111 run : |
112- ./gradlew publish --info
112+ # --max-workers 1 limits Gradle to a single thread even if parallel builds are enabled in the hopes
113+ # of making the the upload to Sonatype Nexus less flaky
114+ ./gradlew publish --info --max-workers 1
113115
114116 if [[ "$IS_SNAPSHOT_VERSION" == "true" ]]; then
115117 echo "Version is a snapshot. No closing of the repository is necessary."
116118 elif [[ "$IS_SNAPSHOT_VERSION" == "false" ]]; then
117119 echo "Version is not a snapshot. Trying to close and release repository."
118- ./gradlew closeAndReleaseRepository --info
120+ ./gradlew closeAndReleaseRepository --info --max-workers 1
119121 else
120122 echo "IS_SNAPSHOT_VERSION has unknown value: $IS_SNAPSHOT_VERSION"
121123 exit 1
You can’t perform that action at this time.
0 commit comments