Skip to content

Commit

Permalink
update build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
iTitus committed Feb 21, 2021
1 parent 9a1665d commit 835820c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ jobs:
prerelease: false

- name: Publish to Maven Central
run: ./gradlew publish closeAndReleaseRepository
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
ORG_GRADLE_PROJECT_ossrh_username: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_ossrh_password: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_nexusUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_nexusPassword: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signing_key: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signing_password: ${{ secrets.SIGNING_PASSWORD }}
20 changes: 4 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'io.codearte.nexus-staging' version '0.22.0'
id 'de.marcphilipp.nexus-publish' version '0.4.0'
id 'io.github.gradle-nexus.publish-plugin' version '1.0.0'
}

group = 'io.github.ititus'
version = '1.4.2'
version = '1.4.3'

wrapper {
distributionType Wrapper.DistributionType.ALL
Expand Down Expand Up @@ -42,9 +41,6 @@ test {
useJUnitPlatform()
}

def ossrhUsername = findProperty("ossrh_username")
def ossrhPassword = findProperty("ossrh_password")

publishing {
publications {
MyPublication(MavenPublication) {
Expand Down Expand Up @@ -86,17 +82,9 @@ signing {
sign publishing.publications.MyPublication
}

nexusStaging {
username = ossrhUsername
password = ossrhPassword
}

nexusPublishing {
connectTimeout = clientTimeout = java.time.Duration.ofHours(1)
connectTimeout = clientTimeout = Duration.ofHours(1)
repositories {
sonatype {
username = ossrhUsername
password = ossrhPassword
}
sonatype {}
}
}

0 comments on commit 835820c

Please sign in to comment.