Skip to content

Commit

Permalink
Merge pull request #2 from the-h-team/dev/1.0.0
Browse files Browse the repository at this point in the history
Dev/1.0.0 #2
  • Loading branch information
ms5984 authored Oct 8, 2024
2 parents 3981178 + 1372447 commit d7d8b01
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion buildSrc/src/main/kotlin/tether-publish.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,24 @@ afterEvaluate {
publishing {
val publicationName = name
publications.create<MavenPublication>(publicationName) {
// if are on an Actions runner, set up GitHub Packages
if (System.getenv("GITHUB_ACTIONS") == "true") {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/the-h-team/Tether")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
pom {
description.set(project.description!!)
description.set(
project.description.takeIf { it != rootProject.description } ?:
throw IllegalStateException("Set the project description in ${project.projectDir.name}/build.gradle.kts before activating publishing.")
)
url.set(project.properties["url"] as String)
inceptionYear.set(project.properties["inceptionYear"] as String)
organization {
Expand All @@ -34,6 +50,7 @@ afterEvaluate {
license {
name.set("Apache License 2.0")
url.set("https://opensource.org/licenses/Apache-2.0")
distribution.set("repo")
}
}
developers {
Expand Down

0 comments on commit d7d8b01

Please sign in to comment.