GitLab CI: publish by job
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user