Merge branch 'master' into test-publish #19
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: Publish | |
on: | |
push: | |
branches: | |
- test-publish | |
jobs: | |
publish: | |
name: Publish | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Install GPG & export signing key | |
env: | |
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
run: | | |
echo "$SIGNING_KEY" | gpg --dearmor > ${HOME}/secring.gpg | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Add Gradle Properties | |
env: | |
MAVEN_CENTRAL_USER_NAME: ${{ secrets.MAVEN_CENTRAL_USER_NAME }} | |
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | |
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | |
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | |
run: | | |
echo "mavenCentralUsername=${MAVEN_CENTRAL_USER_NAME}" >> gradle.properties | |
echo "mavenCentralPassword=${MAVEN_CENTRAL_PASSWORD}" >> gradle.properties | |
echo "signing.keyId=${SIGNING_KEY_ID}" >> gradle.properties | |
echo "signing.password=${SIGNING_KEY_PASSWORD}" >> gradle.properties | |
echo "signing.secretKeyRingFile=${HOME}/secring.gpg" >> gradle.properties | |
- name: Setup Xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- name: Publish To Maven Central | |
run: | | |
./gradlew publishAndReleaseToMavenCentral --no-configuration-cache |