Skip to content

Release SDK to Maven Central #2

Release SDK to Maven Central

Release SDK to Maven Central #2

Workflow file for this run

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 }}