jdk 17 in CI #205
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: Test & Publish | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Test with Gradle | |
run: ./gradlew test | |
publish: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/develop' | |
needs: test | |
steps: | |
- uses: actions/checkout@v2 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Release with Gradle | |
run: ./gradlew clean publishAllPublicationsToMavenCentral | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} |