Merge pull request #22 from janheinrichmerker/dependabot/gradle/jvm-2β¦ #42
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: CI | |
on: push | |
jobs: | |
gradle-build: | |
name: ποΈ Gradle build | |
runs-on: ubuntu-latest | |
steps: | |
- name: π₯ Check-out | |
uses: actions/checkout@v4 | |
- name: π§° Install JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 8 | |
distribution: temurin | |
cache: gradle | |
- name: ποΈ Build with Gradle | |
run: ./gradlew build | |
gradle-test: | |
name: β Gradle test | |
runs-on: ubuntu-latest | |
steps: | |
- name: π₯ Check-out | |
uses: actions/checkout@v4 | |
- name: π§° Install JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 8 | |
distribution: temurin | |
cache: gradle | |
- name: β Test with Gradle | |
run: ./gradlew test | |
github-release: | |
name: π Create GitHub release | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
needs: | |
- gradle-build | |
- gradle-test | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: π₯ Check-out | |
uses: actions/checkout@v4 | |
- name: π Create GitHub release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: Release ${{ github.ref_name }} | |
fail_on_unmatched_files: true | |
draft: false | |
prerelease: false | |
generate_release_notes: true | |
publish-plugin: | |
name: π Publish plugin | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
needs: | |
- gradle-build | |
- gradle-test | |
runs-on: ubuntu-latest | |
steps: | |
- name: π₯ Check-out | |
uses: actions/checkout@v4 | |
- name: π§° Install JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 8 | |
distribution: temurin | |
cache: gradle | |
- name: πͺ Set Gradle Plugin Plugin portal credentials | |
run: | | |
mkdir -p ~/.gradle | |
touch ~/.gradle/gradle.properties | |
echo gradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} >> ~/.gradle/gradle.properties | |
echo gradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }} >> ~/.gradle/gradle.properties | |
- name: π Publish with Gradle | |
run: ./gradlew publishPlugins |