Skip to content

Commit

Permalink
release 1.3.1
Browse files Browse the repository at this point in the history
* kotlin update
* automate maven central publish
  • Loading branch information
derveloper committed Apr 26, 2023
1 parent 8b7c9f5 commit 016633e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Java CI with Gradle
name: Java CI/CD with Gradle

on:
push:
Expand All @@ -15,13 +15,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: gradle
- name: Build with Gradle
run: ./gradlew build --no-daemon

3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Publish package to the Maven Central Repository
on:
workflow_dispatch:
release:
types: [ created ]
jobs:
Expand All @@ -19,4 +20,4 @@ jobs:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_PASSPHRASE }}
run: ./gradlew publishToSonatype --no-daemon
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository --no-daemon
9 changes: 3 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,14 @@ nexusPublishing {
sonatype {
nexusUrl = uri("https://oss.sonatype.org/service/local/")
snapshotRepositoryUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
username = project.hasProperty('sonaAccessUser') ? project.property('sonaAccessUser') : ""
password = project.hasProperty('sonaAccessToken') ? project.property('sonaAccessToken') : ""
}
}
}

ext["signing.keyId"] = project.hasProperty("signing.keyId") ? project.property("signing.keyId") : ""
ext["signing.password"] = project.hasProperty("signing.password") ? project.property("signing.password") : ""
ext["signing.secretKeyRingFile"] = project.hasProperty("signing.secretKeyRingFile") ? project.property("signing.secretKeyRingFile") : ""

signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications
}

Expand Down

0 comments on commit 016633e

Please sign in to comment.