0

GitLab CI: publish by job

This commit is contained in:
2021-10-21 22:24:23 +03:00
parent f923f47765
commit 2b055062a3
3 changed files with 3 additions and 9 deletions

View File

@@ -4,9 +4,6 @@ plugins {
id 'maven-publish'
}
def secrets = new Properties()
file("secrets.properties").withInputStream { secrets.load(it) }
project.group = projectGroup
project.version = projectVersion
@@ -94,8 +91,8 @@ publishing {
maven {
url "https://gitlab.com/api/v4/projects/${project.property('gitlab.projectid')}/packages/maven"
credentials(HttpHeaderCredentials) {
name = 'Private-Token'
value = secrets.getProperty('gitlab.privateToken')
name = 'Job-Token'
value = System.getenv('CI_JOB_TOKEN')
}
authentication {
header(HttpHeaderAuthentication)