1.10.1 release #25
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 to staging repo Maven Central | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
# Release to staging Maven Central | |
staging-maven-central: | |
runs-on: ubuntu-latest | |
steps: | |
# checkout | |
- uses: actions/checkout@v2 | |
# gradle wrapper validation against official sha | |
- uses: gradle/wrapper-validation-action@v1 | |
# setup java | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
# mysql docker | |
- name: DB Docker container | |
run: | | |
cd docker_data | |
docker-compose up -d | |
# gradle cache | |
#- name: Cache Gradle packages | |
# uses: actions/cache@v3 | |
# with: | |
# path: | | |
# ~/.gradle/caches | |
# ~/.gradle/wrapper | |
# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
# restore-keys: | | |
# ${{ runner.os }}-gradle- | |
# set permission to gradlew | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
# build | |
- name: Build with Gradle | |
run: ./gradlew build jar | |
# Decode the private key from secret to file | |
- name: Decode key | |
run: | | |
echo "${{secrets.OSSRH_GPG_SECRET_KEY_FILE}}" > secring.gpg.b64 | |
base64 -d secring.gpg.b64 > sec-key.gpg | |
# publish to maven central | |
- name: Publish to staging repo Maven Central | |
env: | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} | |
run: | | |
./gradlew -Psigning.keyId=${{secrets.OSSRH_GPG_SECRET_KEY}} -Psigning.password=${{secrets.OSSRH_GPG_SECRET_KEY_PASSWORD}} -Psigning.secretKeyRingFile="sec-key.gpg" publishToSonatype closeSonatypeStagingRepository |