Skip to content

Commit

Permalink
Fix GH build action
Browse files Browse the repository at this point in the history
  • Loading branch information
dhyces committed May 24, 2024
1 parent e3fac36 commit a55416a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: build
run: ./gradlew build --stacktrace
run: ./gradlew build
- name: capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '21' }} # Only upload artifacts built from latest java on one OS
uses: actions/upload-artifact@v3
Expand Down
44 changes: 25 additions & 19 deletions buildSrc/src/main/kotlin/shared.conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -77,26 +77,32 @@ tasks.withType<JavaCompile>().configureEach {
// enabled = false
//}

publishing {
repositories {
maven {
name = "Local"
url = uri("file://" + findProperty("local_maven"))
}
maven {
name = "Maven"
url = findProperty("mavenUrl")?.let { uri(it) }!!
credentials(PasswordCredentials::class) {
username = findProperty("mavenUsername")?.toString()
password = findProperty("mavenPassword")?.toString()
if (hasProperty("publisher")) {
publishing {
repositories {
maven {
name = "Local"
url = uri("file://" + findProperty("local_maven"))
}
}
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/dhyces/trimmed")
credentials {
username = (project.findProperty("gpr.user") ?: System.getenv("USERNAME")) as String
password = (project.findProperty("gpr.key") ?: System.getenv("TOKEN")) as String
if (hasProperty("mavenUrl")) {
maven {
name = "Maven"
url = findProperty("mavenUrl")?.let { uri(it) }!!
credentials(PasswordCredentials::class) {
username = findProperty("mavenUsername")?.toString()
password = findProperty("mavenPassword")?.toString()
}
}
}
if (hasProperty("trimmedGithubPackages")) {
maven {
name = "GitHubPackages"
url = uri(findProperty("trimmedGithubPackages")?.let { uri(it) }!!)
credentials {
username = (project.findProperty("gpr.user") ?: System.getenv("USERNAME")) as String
password = (project.findProperty("gpr.key") ?: System.getenv("TOKEN")) as String
}
}
}
}
}
Expand Down

0 comments on commit a55416a

Please sign in to comment.