Skip to content

Commit

Permalink
fix: github maven repo was missing github env values
Browse files Browse the repository at this point in the history
  • Loading branch information
bric3 committed Apr 2, 2024
1 parent 38cc9df commit bdf8583
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.ORG_GRADLE_PROJECT_OSSRHUSERNAME }}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.ORG_GRADLE_PROJECT_OSSRHPASSWORD }}
ORG_GRADLE_PROJECT_githubUser: ${{ github.actor }}
ORG_GRADLE_PROJECT_githubToken: ${{ secrets.GITHUB_TOKEN }}
# com.javiersc.semver.gradle.plugin should pick the actual tag
run: ./gradlew publish -Ppublish.central=true --stacktrace

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,16 @@ publishing {
}
}

if (isGithubRelease) {
logger.lifecycle("Publishing to GitHubPackages")
val ghUser = properties("githubUser")
val ghToken = properties("githubToken")
if (isGithubRelease && ghUser != "null" && ghToken != "null") {
logger.lifecycle("Will be publishing to GitHubPackages")
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/bric3/fireplace")
credentials {
username = providers.environmentVariable("GITHUB_USER").get()
password = providers.environmentVariable("GITHUB_TOKEN").get()
username = ghUser
password = ghToken
}
}
}
Expand All @@ -99,9 +101,9 @@ publishing {
signing {
setRequired({ gradle.taskGraph.hasTask("publish") })
useInMemoryPgpKeys(
// findProperty("signingKeyId") as? String,
findProperty("signingKey") as? String,
findProperty("signingPassword") as? String
// properties("signingKeyId") as? String,
properties("signingKey"),
properties("signingPassword") as? String
)
sign(publishing.publications)
}
Expand Down

0 comments on commit bdf8583

Please sign in to comment.