Skip to content

Commit

Permalink
Merge pull request #9 from usefulness/cleanup_workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszkwiecinski authored Feb 27, 2021
2 parents 5457a94 + 150d6ec commit d392cf9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ env:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
Expand All @@ -26,16 +24,18 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 15
- name: Cache .gradle
uses: burrunan/gradle-cache-action@v1
- name: Unwrap GPG key
env:
GPG_KEY_CONTENTS: ${{ secrets.GPG_KEY_CONTENTS }}
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}
run: sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > '$SIGNING_SECRET_KEY_RING_FILE'"
- name: Build app with Gradle
run: ./gradlew build
run: ./gradlew assemble
- name: Publish to Maven Central
run: ./gradlew publishMavenJavaPublicationToMavenCentralRepository
- name: Publish to Github Package Registry
run: ./gradlew publishMavenJavaPublicationToGithubRepository
- name: Publish CLI to Github Package Registry
run: ./gradlew publishShadowPublicationToGithubRepository
- name: Publish to Maven Central
run: ./gradlew publishMavenJavaPublicationToMavenCentralRepository
20 changes: 18 additions & 2 deletions buildSrc/src/main/kotlin/PublishingPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class PublishingPlugin : Plugin<Project> {

extensions.configure<JavaPluginExtension> {
withSourcesJar()
withJavadocJar()
}
extensions.configure<PublishingExtension> {
with(repositories) {
Expand Down Expand Up @@ -45,8 +46,23 @@ class PublishingPlugin : Plugin<Project> {
}
}
with(publications) {
register("mavenJava", MavenPublication::class.java) {
it.from(components.getByName("java"))
register("mavenJava", MavenPublication::class.java) { publication ->
publication.from(components.getByName("java"))
publication.pom { pom ->
pom.description.set("A tool that scans sources for all resolved lisks to public trackers")
pom.url.set("https://github.com/usefulness/issuechecker")
pom.licenses { licenses ->
licenses.license { license ->
license.name.set("MIT")
license.url.set("https://github.com/usefulness/issuechecker/blob/master/LICENSE")
}
}
pom.scm { scm ->
scm.connection.set("scm:git:github.com/usefulness/issuechecker.git")
scm.developerConnection.set("scm:git:ssh://github.com/usefulness/issuechecker.git")
scm.url.set("https://github.com/usefulness/issuechecker/tree/master")
}
}
}
}
}
Expand Down

0 comments on commit d392cf9

Please sign in to comment.