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:
109
109
echo "IS_SNAPSHOT_VERSION=$IS_SNAPSHOT_VERSION" >> $GITHUB_ENV
110
110
- name : Publish to Sonatype Nexus
111
111
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
113
115
114
116
if [[ "$IS_SNAPSHOT_VERSION" == "true" ]]; then
115
117
echo "Version is a snapshot. No closing of the repository is necessary."
116
118
elif [[ "$IS_SNAPSHOT_VERSION" == "false" ]]; then
117
119
echo "Version is not a snapshot. Trying to close and release repository."
118
- ./gradlew closeAndReleaseRepository --info
120
+ ./gradlew closeAndReleaseRepository --info --max-workers 1
119
121
else
120
122
echo "IS_SNAPSHOT_VERSION has unknown value: $IS_SNAPSHOT_VERSION"
121
123
exit 1
You can’t perform that action at this time.
0 commit comments