Merge pull request #291 from gdcc/renovate/spring-core #269
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: | |
| - branch-5.0 | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| if: ${{ !contains(github.event.head_commit.message, '[maven-release-plugin]') }} | |
| strategy: | |
| matrix: | |
| java: [17] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Maven Central Repository | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: 'temurin' | |
| server-id: central | |
| server-username: MAVEN_USERNAME | |
| server-password: MAVEN_PASSWORD | |
| - name: Cache Maven packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| - name: Build, test, verify and publish snapshot | |
| run: mvn -B verify -Djdk.version=${{ matrix.java }} | |
| # 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@v5 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: 'temurin' | |
| server-id: central | |
| server-username: MAVEN_USERNAME | |
| server-password: MAVEN_PASSWORD | |
| - name: Publish snapshot | |
| if: ${{ matrix.java == '17' }} | |
| run: mvn deploy -pl '!report,!xoai-data-provider-tck' -DskipUT -DskipIT -Djdk.version=${{ matrix.java }} | |
| env: | |
| MAVEN_USERNAME: ${{ secrets.DATAVERSEBOT_SONATYPE_USERNAME }} | |
| MAVEN_PASSWORD: ${{ secrets.DATAVERSEBOT_SONATYPE_TOKEN }} |