diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e3fbf24..f5d54c7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,11 +10,15 @@ jobs: - name: Set up Maven Central Repository uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17.0.8+7' distribution: 'temurin' + cache: maven server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD + - if: github.event.release + name: Update version in pom.xml (Release only) + run: mvn -B versions:set -DnewVersion=${{ github.event.release.tag_name }} -DgenerateBackupPoms=false - name: Publish package run: mvn --batch-mode deploy env: