From c88a6c8d8d1018a2ac147f0a72035a3c5c9f45ed Mon Sep 17 00:00:00 2001 From: Edoardo Ierina Date: Wed, 16 Aug 2023 10:20:58 +0100 Subject: [PATCH] Fixed build gradle publish section --- .github/workflows/publish.yml | 2 ++ build.gradle.kts | 19 +++++++------------ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0e23d46..22b0bf1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,3 +25,5 @@ jobs: env: USERNAME: ${{ github.actor }} PASSWORD: ${{ secrets.GITHUB_TOKEN }} + GITHUB_USERNAME: ${{ github.actor }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/build.gradle.kts b/build.gradle.kts index 0ae2f70..6927c19 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -44,27 +44,22 @@ tasks.withType().configureEach } publishing { -// publications { -// create("mavenJava") { -// from(components["java"]) -// } -// } repositories { maven { name = "GitHubPackages" url = uri("https://maven.pkg.github.com/eierina/patricia-trie") credentials { - username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME") - password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN") + username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_USERNAME") + password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN") } } } publications { - gpr(MavenPublication) { - groupId = project.group - version = project.version - artifactId = 'patricia-trie' - from components.java + create("gpr") { + groupId = project.group.toString() + version = project.version.toString() + artifactId = "patricia-trie" + from(components["java"]) } } } \ No newline at end of file