Bump actions/setup-java from 3 to 4 #87
Workflow file for this run
This file contains 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: Continuous Integration | |
on: | |
push: | |
branches: [ '*' ] | |
pull_request: | |
branches: [ '*' ] | |
env: | |
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
java: [ 11, 17, 19 ] | |
name: "Java ${{ matrix.java }}" | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cache Maven Repository | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: maven-java-${{ matrix.java }}-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
maven-java-${{ matrix.java }}- | |
maven- | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java }} | |
- name: Build | |
run: mvn -B -e -Prelease -Dgpg.skip=true verify | |
- name: Remove Snapshots | |
run: find ~/.m2/repository -name '*-SNAPSHOT' -a -type d -print0 | xargs -0 rm -rf | |
deploy: | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
name: Deploy | |
runs-on: ubuntu-22.04 | |
needs: build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cache Maven Repository | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: maven-deploy-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
maven-deploy- | |
maven- | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 11 | |
server-id: ossrh | |
server-username: OSSRH_USERNAME | |
server-password: OSSRH_PASSWORD | |
- name: Deploy | |
run: mvn -B -e -Prelease -Dgpg.skip=true -DskipTests=true deploy | |
env: | |
OSSRH_USERNAME: veithen | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
- name: Remove Snapshots | |
run: find ~/.m2/repository -name '*-SNAPSHOT' -a -type d -print0 | xargs -0 rm -rf |