opentcs/gradle/publishing-gitlab.gradle
CaiXiang aa56926258
Some checks failed
Gradle Build / build (push) Has been cancelled
Initial commit
2024-11-30 18:36:13 +08:00

27 lines
707 B
Groovy

// SPDX-FileCopyrightText: The openTCS Authors
// SPDX-License-Identifier: MIT
publishing {
repositories {
if (Boolean.valueOf(project.findProperty('DO_DEPLOY_PRIVATE'))
&& System.getenv('CI_API_V4_URL') != null
&& System.getenv('CI_PROJECT_ID') != null
&& System.getenv('CI_JOB_TOKEN') != null) {
maven {
name = 'deploy-repo-gitlab'
url = "${System.env.CI_API_V4_URL}/projects/${System.env.CI_PROJECT_ID}/packages/maven"
credentials(HttpHeaderCredentials) {
name = 'Job-Token'
value = "${System.env.CI_JOB_TOKEN}"
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}
}