diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml index 808861e..77a7c8b 100644 --- a/.github/workflows/publish-snapshot.yml +++ b/.github/workflows/publish-snapshot.yml @@ -19,9 +19,9 @@ jobs: - 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=$((firstDigit+1)).0.0-SNAPSHOT" >> $GITHUB_ENV - - run: ./gradlew publish --no-daemon --no-parallel - if: endsWith(env.VERSION_NAME, '-SNAPSHOT') + 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 }}