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