bump versions (#62) #188
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: Gradle CI | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- main | |
jobs: | |
# Basic Gradle wrapper validation. This step is run first, due to security | |
# concerns. Running our whole pipeline with Gradle with a corrupt wrapper, | |
# could expose our secrets, and we definitely want to prevent this. | |
validation: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
name: Gradle wrapper validation | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v3 | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
# Basic Compliance check. Checks if codeStyle is correct and if reuse | |
# is applied correctly | |
compliance: | |
runs-on: ubuntu-latest | |
name: Compliance check | |
needs: validation | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: REUSE Compliance Check | |
uses: fsfe/reuse-action@v5 | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'sapmachine' | |
cache: 'gradle' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Check code style | |
run: ./gradlew spotlessCheck | |
# One Basic check, for all kind of OS - to check if we have some kind of | |
# issue with any kind of OS | |
basic: | |
strategy: | |
matrix: | |
os: [ ubuntu, macos, windows ] | |
runs-on: ${{ matrix.os }}-latest | |
name: on ${{ matrix.os }} | |
needs: validation | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'sapmachine' | |
cache: 'gradle' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Build and Test | |
run: ./gradlew check -x spotlessCheck | |
- uses: actions/upload-artifact@v4 | |
if: ${{ failure() }} | |
with: | |
name: ${{ matrix.os }}-test-result | |
path: | | |
build/reports | |
build/test-results | |
# Check supported Gradle releases | |
# https://gradle.org/releases/ | |
# https://docs.gradle.org/current/userguide/feature_lifecycle.html#eol_support | |
verify: | |
strategy: | |
matrix: | |
GRADLE_VERSION: | |
- "7.6.3" | |
- "8.12" | |
runs-on: ubuntu-latest | |
needs: [basic, compliance] | |
name: with Gradle ${{ matrix.GRADLE_VERSION }} | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
- name: Setup Java JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'sapmachine' | |
cache: 'gradle' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Build and Test | |
run: ./gradlew check -x spotlessCheck | |
env: | |
GRADLE_VERSION: "${{ matrix.GRADLE_VERSION }}" | |
- uses: actions/upload-artifact@v4 | |
if: ${{ failure() }} | |
with: | |
name: ${{ matrix.GRADLE_VERSION }}-test-result | |
path: | | |
*/build/reports | |
*/build/test-results | |
publish: | |
runs-on: ubuntu-latest | |
needs: verify | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
- name: Setup Java JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'sapmachine' | |
cache: 'gradle' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Publish Plugin | |
env: | |
ORG_GRADLE_PROJECT_gradle.publish.key: ${{secrets.PUBLISH_KEY}} | |
ORG_GRADLE_PROJECT_gradle.publish.secret: ${{secrets.PUBLISH_SECRET}} | |
run: ./gradlew publishPlugins |