From 0e6b32af3045e91d4daf592bbe1b79525b00704b Mon Sep 17 00:00:00 2001 From: Raphael Schweikert Date: Wed, 16 Oct 2024 17:00:16 +0200 Subject: [PATCH] ci: configure maven publication --- build.gradle.kts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 100f2cd..2d0b29d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -175,3 +175,27 @@ aem { } } } + +publishing { + repositories { + val mavenPublishUser: String? by project + val mavenPublishPassword: String? by project + if (mavenPublishUser != null && mavenPublishPassword != null) { + maven { + name = "GitHub" + url = uri("https://maven.pkg.github.com/swisscom/JCR-Hopper") + credentials { + username = mavenPublishUser + password = mavenPublishPassword + } + } + } + } + + publications { + create("hopper") { + artifact(tasks.packageCompose) + from(components["java"]) + } + } +}