Release SDK to Maven Central #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release SDK to Maven Central | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish-sdk: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/[email protected] | |
with: | |
distribution: zulu | |
java-version: 17 | |
- name: Remove SNAPSHOT from version name | |
run: sed -i 's/-SNAPSHOT//g' gradle.properties | |
- name: Clean project before building SDK | |
run: ./gradlew clean | |
- name: Build and publish SDK to the Maven Central Repository | |
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSWORD }} | |
- name: Release SDK to the Maven Central Repository | |
run: ./gradlew closeAndReleaseRepository | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} |