Skip to content

chore(sonar): configure the correct source path. #17

chore(sonar): configure the correct source path.

chore(sonar): configure the correct source path. #17

name: Publish Snapshot to Maven Central
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '11.0.4'
java-package: jdk
settings-path: ${{ github.workspace }}
- name: Retrieve version
run: |
firstDigit=$(cat gradle.properties | grep -w "VERSION_NAME" | cut -d'=' -f2 | head -c 1 | tr -d "\n\r")
echo "VERSION_NAME_SNAPSHOT=$((firstDigit+1)).0.0-SNAPSHOT" >> $GITHUB_ENV
- run: ./gradlew publish -PVERSION_NAME=$VERSION_NAME_SNAPSHOT --no-daemon --no-parallel
if: endsWith(env.VERSION_NAME_SNAPSHOT, '-SNAPSHOT')
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.CENTRAL_OSS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.CENTRAL_OSS_PASSWORD }}