From 220814501ea4b6e9eec2f803061e616bf8b4837b Mon Sep 17 00:00:00 2001 From: LarissaASLeite Date: Wed, 6 Nov 2024 18:11:35 +0100 Subject: [PATCH] fix-gradle-publish --- build.gradle.kts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 9f0e283d..38a9bd82 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -89,15 +89,22 @@ configure { publishing { publications { - create("myLibrary") { + create("github") { from(components["java"]) + + groupId = project.group.toString() + artifactId = project.name + version = project.version.toString() } } - repositories { maven { - name = "myRepo" - url = uri(layout.buildDirectory.dir("repo")) + name = "GitHubPackages" + url = uri("https://maven.pkg.github.com/pagopa/p4pa-payhub-activities") + credentials { + username = System.getenv("GITHUB_ACTOR") ?: "GITHUB_ACTOR" + password = System.getenv("GITHUB_TOKEN") + } } } } \ No newline at end of file