Skip to content

Commit

Permalink
Add signing plugin for publishing (#13)
Browse files Browse the repository at this point in the history
* Add signing plugin for publishing

* Bump version

* Pass signing secrets to publish
  • Loading branch information
boswelja authored Sep 30, 2023
1 parent 46ced77 commit 6dd0021
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
ORG_GRADLE_PROJECT_githubToken: ${{ secrets.GITHUB_TOKEN }}
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

upload-pages:
runs-on: ubuntu-latest
Expand Down
10 changes: 9 additions & 1 deletion core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ plugins {
alias(libs.plugins.dokka)

id("maven-publish")
id("signing")
}
group = "io.github.boswelja.menuprovider"
version = "1.0.2"
version = "1.0.3"

android {
namespace = "com.boswelja.menuprovider"
Expand Down Expand Up @@ -66,6 +67,13 @@ detekt {
basePath = rootDir.absolutePath
}

signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications)
}

publishing {
repositories {
if (System.getenv("PUBLISHING") == "true") {
Expand Down
10 changes: 9 additions & 1 deletion material3/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ plugins {
alias(libs.plugins.dokka)

id("maven-publish")
id("signing")
}

group = "io.github.boswelja.menuprovider"
version = "1.0.2"
version = "1.0.3"

android {
namespace = "com.boswelja.menuprovider.material3"
Expand Down Expand Up @@ -66,6 +67,13 @@ detekt {
basePath = rootDir.absolutePath
}

signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications)
}

publishing {
repositories {
if (System.getenv("PUBLISHING") == "true") {
Expand Down

0 comments on commit 6dd0021

Please sign in to comment.