You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/README-deploy.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,9 +127,15 @@ To override the default Maven command:
127
127
with:
128
128
branches: ${{ inputs.branches }}
129
129
custom_build_command: |
130
-
./mvnw clean install -B
131
-
./mvnw verify -B
130
+
if [[ "$SHOULD_DEPLOY" == "true" ]]; then
131
+
./mvnw clean deploy -Pdocs,deploy,spring -B -U
132
+
else
133
+
echo "Will not deploy artifacts"
134
+
./mvnw clean install -Pspring -B -U
135
+
fi
132
136
```
137
+
When using a custom_build_command there is an environment variable named `SHOULD_DEPLOY` which indicates that the JDK being used is the one we should deploy snapshots from (currently JDK 8 if supported or JDK 17). This is also the JDK
138
+
we should use to build docs. This is why in the snippet above we call the `deploy` goal and add the `docs` and `deploy` profiles when `SHOULD_DEPLOY` is true.
0 commit comments