Skip to content

Commit

Permalink
Merge pull request #6 from orkes-io/publish-release-to-maven-central
Browse files Browse the repository at this point in the history
Publish release to maven central
  • Loading branch information
jmigueprieto authored Apr 25, 2022
2 parents cd4dde4 + 84b278d commit 9d801cf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
# separate terms of service, privacy policy, and support
# documentation.

name: Publish to Maven Central
name: Publish release to Maven Central
on:
workflow_dispatch:
release:
types:
- released

jobs:
publish:
Expand All @@ -21,7 +23,10 @@ jobs:
distribution: 'zulu'
java-version: '11'
- name: Publish
run: ./gradlew publish -PmavenCentral -Pusername=${{ secrets.SONATYPE_USERNAME }} -Ppassword=${{ secrets.SONATYPE_PASSWORD }}
run: |
export ORKES_CLIENT_VERSION="$(git describe --tags --abbrev=0)"
echo Publishing version $ORKES_CLIENT_VERSION
./gradlew publish -Pversion=$ORKES_CLIENT_VERSION -PmavenCentral -Pusername=${{ secrets.SONATYPE_USERNAME }} -Ppassword=${{ secrets.SONATYPE_PASSWORD }}
env:
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
Expand Down
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ signing {
def signingKeyId = findProperty('signingKeyId')
def signingKey = findProperty('signingKey')
def signingPassword = findProperty('signingPassword')
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
if (signingKeyId && signingKey && signingPassword) {
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
}

sign publishing.publications
}

0 comments on commit 9d801cf

Please sign in to comment.