File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -204,28 +204,52 @@ test_examples_manual:
204204
205205# stage: publish -------------------------
206206
207- publish :
207+ .publish_base :
208208 stage : publish
209209 extends : .publish
210210 dependencies :
211211 - build_scheduled
212212 - build_manual
213- rules :
214- - if : ' $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/'
215213 script :
216214 - ./gradlew publish
217215
216+ publish :
217+ extends : .publish_base
218+ rules :
219+ - if : ' $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/'
220+
218221publish_manual :
219- stage : publish
220- extends : .publish
222+ extends : .publish_base
221223 when : manual
224+
225+ # # trigger deployment
226+
227+ .trigger_deployment_base :
228+ extends : .publish
229+ stage : publish
230+ image : curlimages/curl:8.14.1
231+ script :
232+ - NAMESPACE="com.deepl.api"
233+ - URL="https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/$NAMESPACE"
234+ - PARAMS="publishing_type=automatic"
235+ - BEARER_TOKEN=$(echo "${ORG_GRADLE_PROJECT_mavenUploadUsername}:${ORG_GRADLE_PROJECT_mavenUploadPassword}" | base64)
236+ - |
237+ curl "$URL?$PARAMS" --header "Authorization: Bearer $BEARER_TOKEN" -d "" --write-out "%{http_code}\n"
238+
239+ trigger_deployment :
240+ extends : .trigger_deployment_base
222241 dependencies :
223- - build_scheduled
224- - build_manual
242+ - publish
225243 rules :
226244 - if : ' $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/'
227- script :
228- - ./gradlew publish
245+
246+ trigger_deployment_manual :
247+ extends : .trigger_deployment_base
248+ dependencies :
249+ - publish_manual
250+ when : manual
251+
252+ # # gitlab release
229253
230254gitlab release :
231255 stage : publish
You can’t perform that action at this time.
0 commit comments