Skip to content

Commit

Permalink
Merge pull request #9 from andrei-punko/add-publishing-github-package…
Browse files Browse the repository at this point in the history
…s-task

Add step with publishing packages to GitHub into build script. Fix #8
  • Loading branch information
andrei-punko authored Oct 28, 2024
2 parents 343d66d + 2e20b79 commit 59438e0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
19 changes: 19 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'java'
id 'jacoco'
id("maven-publish")
}

group = 'by.andd3dfx'
Expand Down Expand Up @@ -58,3 +59,21 @@ jacocoTestReport {
}))
}
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/andrei-punko/pde-solvers")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
}
publications {
gpr(MavenPublication) {
from(components.java)
}
}
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
lombokVersion = 1.18.34
gpr.user = GITHUB_USERNAME
gpr.key = GITHUB_TOKEN

0 comments on commit 59438e0

Please sign in to comment.