Skip to content

Commit a0600a5

Browse files
Merge pull request #4 from aaronriekenberg/050622_github_packages
try to get publish to github packages working
2 parents 841322c + 0f48f3d commit a0600a5

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

.github/workflows/gradle-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ jobs:
3232
- name: Build with Gradle
3333
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
3434
with:
35-
arguments: -Prelease.useLastTag=true build
35+
arguments: build
3636

3737
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
3838
# the publishing section of your build.gradle
3939
- name: Publish to GitHub Packages
4040
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
4141
with:
42-
arguments: -Prelease.useLastTag=true publish
42+
arguments: publish
4343
env:
4444
USERNAME: ${{ github.actor }}
4545
TOKEN: ${{ secrets.GITHUB_TOKEN }}

build.gradle.kts

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@ buildscript {
66
mavenCentral()
77
maven { url = uri("https://plugins.gradle.org/m2/") }
88
}
9-
dependencies {
10-
classpath("com.netflix.nebula:nebula-release-plugin:16.0.0")
11-
}
129
}
1310

1411
plugins {
1512
kotlin("jvm") version "1.6.10"
16-
id("com.jfrog.artifactory") version "4.26.2"
1713
`maven-publish`
1814
jacoco
1915
id("org.jetbrains.dokka") version "1.6.10" apply false
@@ -28,8 +24,6 @@ if (dokkaEnabled) {
2824
apply(plugin = "org.jetbrains.dokka")
2925
}
3026

31-
apply(plugin = "nebula.release")
32-
3327
group = "com.target"
3428
java.sourceCompatibility = JavaVersion.VERSION_11
3529

@@ -79,4 +73,22 @@ tasks.jacocoTestReport {
7973
csv.isEnabled = false
8074
html.destination = file("${buildDir}/jacocoHtml")
8175
}
76+
}
77+
78+
publishing {
79+
repositories {
80+
maven {
81+
name = "GitHubPackages"
82+
url = uri("https://maven.pkg.github.com/target/native_memory_allocator")
83+
credentials {
84+
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
85+
password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN")
86+
}
87+
}
88+
}
89+
publications {
90+
register<MavenPublication>("gpr") {
91+
from(components["java"])
92+
}
93+
}
8294
}

0 commit comments

Comments
 (0)