Merge pull request #685 from smeup/feature/LS24005347/missing-found #385
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: Deploy to maven central | |
on: | |
push: | |
branches: [master, develop] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 11 | |
distribution: zulu | |
- uses: gradle/actions/setup-gradle@v4 | |
# save private key to file (private.gpg) | |
- run: echo "${{ secrets.GPG_KEY_BASE64 }}" | base64 -d > ~/private.gpg | |
# create gradle.properties file | |
- run: | | |
mkdir -p ~/.gradle/ | |
echo "GRADLE_USER_HOME=${HOME}/.gradle" >> $GITHUB_ENV | |
echo "signing.keyId=${{ secrets.GPG_KEY_ID }}" >> ~/.gradle/gradle.properties | |
echo "signing.password=${{ secrets.GPG_PASSPHRASE }}" >> ~/.gradle/gradle.properties | |
echo "signing.secretKeyRingFile=${HOME}/private.gpg" >> ~/.gradle/gradle.properties | |
echo "sonatypeUsername=${{ secrets.OSSRH_USERNAME }}" >> ~/.gradle/gradle.properties | |
echo "sonatypePassword=${{ secrets.OSSRH_PASSWORD }}" >> ~/.gradle/gradle.properties | |
# deploy | |
- run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository |