diff --git a/.github/workflows/gradle-publish.yml b/.github/workflows/gradle-publish.yml index 3f9d86e..9aeb2b8 100644 --- a/.github/workflows/gradle-publish.yml +++ b/.github/workflows/gradle-publish.yml @@ -32,14 +32,14 @@ jobs: - name: Build with Gradle uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee with: - arguments: -Prelease.useLastTag=true build + arguments: build # The USERNAME and TOKEN need to correspond to the credentials environment variables used in # the publishing section of your build.gradle - name: Publish to GitHub Packages uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee with: - arguments: -Prelease.useLastTag=true publish + arguments: publish env: USERNAME: ${{ github.actor }} TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/build.gradle.kts b/build.gradle.kts index dd7c9a1..98be384 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,14 +6,10 @@ buildscript { mavenCentral() maven { url = uri("https://plugins.gradle.org/m2/") } } - dependencies { - classpath("com.netflix.nebula:nebula-release-plugin:16.0.0") - } } plugins { kotlin("jvm") version "1.6.10" - id("com.jfrog.artifactory") version "4.26.2" `maven-publish` jacoco id("org.jetbrains.dokka") version "1.6.10" apply false @@ -28,8 +24,6 @@ if (dokkaEnabled) { apply(plugin = "org.jetbrains.dokka") } -apply(plugin = "nebula.release") - group = "com.target" java.sourceCompatibility = JavaVersion.VERSION_11 @@ -79,4 +73,22 @@ tasks.jacocoTestReport { csv.isEnabled = false html.destination = file("${buildDir}/jacocoHtml") } +} + +publishing { + repositories { + maven { + name = "GitHubPackages" + url = uri("https://maven.pkg.github.com/target/native_memory_allocator") + credentials { + username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME") + password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN") + } + } + } + publications { + register("gpr") { + from(components["java"]) + } + } } \ No newline at end of file