Merge pull request #369 from pac4j/renovate/spring-core #649
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: Java CI | |
| env: | |
| JDK_CURRENT: 17 | |
| DISTRIBUTION: zulu | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Set up JDK | |
| uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5 | |
| with: | |
| java-version: ${{ env.JDK_CURRENT }} | |
| distribution: ${{ env.DISTRIBUTION }} | |
| - name: Cache Maven dependencies | |
| uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| - name: Build with Maven | |
| run: mvn -B clean install | |
| deploy: | |
| if: startsWith(github.ref, 'refs/heads/') | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Set up JDK | |
| uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5 | |
| with: | |
| java-version: ${{ env.JDK_CURRENT }} | |
| server-id: central-portal-snapshots | |
| server-username: MAVEN_USERNAME | |
| server-password: MAVEN_PASSWORD | |
| distribution: ${{ env.DISTRIBUTION }} | |
| - name: Deploy to Sonatype | |
| run: mvn -B -DskipTests deploy | |
| env: | |
| MAVEN_USERNAME: ${{ secrets.SONATYPE_USER }} | |
| MAVEN_PASSWORD: ${{ secrets.SONATYPE_PWD }} |