chore(deps): update maven plugins and plugin dependency updates (#65) #73
This file contains hidden or 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: Snapshot to Maven Central Repository | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| if: ${{ !contains(github.event.head_commit.message, '[maven-release-plugin]') }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Determine Java version from POM | |
| run: | | |
| echo "JAVA_VERSION=$(grep '<jdk.version>' pom.xml | cut -f2 -d'>' | cut -f1 -d'<')" >> ${GITHUB_ENV} | |
| - name: Set up JDK ${{ env.JAVA_VERSION }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{ env.JAVA_VERSION }} | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Build, test, verify | |
| run: mvn -B verify -DskipFlatten | |
| # Running setup-java again overwrites the settings.xml - IT'S MANDATORY TO DO THIS SECOND SETUP!!! | |
| - name: Set up Maven Central Repository | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{ env.JAVA_VERSION }} | |
| distribution: 'temurin' | |
| server-id: central | |
| server-username: MAVEN_USERNAME | |
| server-password: MAVEN_PASSWORD | |
| - name: Publish snapshot | |
| # Note: -DskipEnforce.pomcheck-strict=false is only useful for this Parent POM to make <repositories> available to children! | |
| # Note: -Dproject.github.repo=maven-parent is necessary so we can keep project.artifactId the sane default for children! | |
| run: mvn deploy -DskipUT -DskipIT -DskipFlatten -DskipEnforce.pomcheck-strict=false -Dproject.github.repo=maven-parent | |
| env: | |
| MAVEN_USERNAME: ${{ secrets.DATAVERSEBOT_SONATYPE_USERNAME }} | |
| MAVEN_PASSWORD: ${{ secrets.DATAVERSEBOT_SONATYPE_TOKEN }} |