Update actions/setup-java action to v4 #82
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: build | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
java-version: | |
- 11 | |
- 17 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: ${{ matrix.java-version }} | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Publish | |
if: ${{ (github.ref == 'refs/heads/main' || startswith(github.ref, 'refs/tags/')) && matrix.java-version == '11' }} | |
run: ./gradlew publish | |
env: | |
SIGNING_PRIVATE_KEY: ${{ secrets.MAVEN_CENTRAL_GPG_KEY }} | |
SIGNING_PASSWORD: ${{ secrets.MAVEN_CENTRAL_GPG_PASSWORD }} | |
ORG_GRADLE_PROJECT_sonatype_username: ${{ secrets.SONATYPE_S01_USERNAME }} | |
ORG_GRADLE_PROJECT_sonatype_password: ${{ secrets.SONATYPE_S01_PASSWORD }} |