mirror of
https://github.com/GTNewHorizons/Postea.git
synced 2026-11-12 16:37:38 +00:00
buildscript: fix publishing section
This commit is contained in:
1 parent
fae84dcbe0
commit
1d64f1f1a4
1 file changed
+9
-16
+9
-16
@@ -464,23 +464,16 @@ artifacts {
|
||||
// publishing
|
||||
publishing {
|
||||
repositories {
|
||||
String owner = System.getenv("REPOSITORY_OWNER")
|
||||
String repositoryName = System.getenv("REPOSITORY_NAME")
|
||||
String githubUser = System.getenv("GITHUB_ACTOR")
|
||||
String githubToken = System.getenv("GITHUB_TOKEN")
|
||||
boolean isInGithubCIEnvironment = owner != null && repositoryName != null && githubUser != null && githubToken != null
|
||||
|
||||
if (isInGithubCIEnvironment) {
|
||||
maven {
|
||||
name = "GitHubPackages"
|
||||
url = "https://maven.pkg.github.com/$owner/$repositoryName"
|
||||
credentials {
|
||||
username = githubUser
|
||||
password = githubToken
|
||||
}
|
||||
maven {
|
||||
String owner = System.getenv("REPOSITORY_OWNER") ?: "Unknown"
|
||||
String repositoryName = System.getenv("REPOSITORY_NAME") ?: "Unknown"
|
||||
String githubRepositoryUrl = "https://maven.pkg.github.com/$owner/$repositoryName"
|
||||
name = "GitHubPackages"
|
||||
url = githubRepositoryUrl
|
||||
credentials {
|
||||
username = System.getenv("GITHUB_ACTOR") ?: "NONE"
|
||||
password = System.getenv("GITHUB_TOKEN") ?: "NONE"
|
||||
}
|
||||
} else {
|
||||
print("Assuming not being in CI environment: skipping github publishing configuration")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user