Skip to content

Update Gradle Wrapper to version 8.11 #75

Update Gradle Wrapper to version 8.11

Update Gradle Wrapper to version 8.11 #75

Workflow file for this run

# Continuous Integration
name: Build
on:
push:
branches:
- '*'
pull_request:
branches:
- main
- develop
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
is_main: ${{ github.ref_name == github.event.repository.default_branch && 'yes' || '' }}
is_develop: ${{ github.ref_name == 'develop' && 'yes' || '' }}
is_fork: ${{ github.event_name == 'pull_request' && 'yes' || '' }}
steps:
# ================================
# SHALLOW CLONE
# ================================
- name: Shallow clone
uses: actions/checkout@v4
# ================================
# VALIDATE GRADLE WRAPPER
# ================================
- name: Validate Gradle Wrapper files
uses: gradle/actions/wrapper-validation@v4
# ================================
# SET UP JDK
# ================================
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-package: jdk
java-version: 21
# ================================
# SET UP GRADLE
# ================================
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
build-scan-terms-of-use-agree: "yes"
cache-read-only: ${{ !env.is_main && !env.is_develop }}
# ================================
# EXPORT GRADLE PROPERTIES
# ================================
- name: Export Gradle properties
id: properties
uses: guillermocalvo/gradle-properties@v3
with:
output_file: ${{ github.output }}
export: version
# ================================
# BUILD
# ================================
- name: Build version ${{ steps.properties.outputs.version }}
run: ./gradlew build -x check
# ================================
# CHECK
# ================================
- name: Check
run: ./gradlew check
# ================================
# PUBLISH SNAPSHOT
# ================================
- name: Publish snapshot version ${{ steps.properties.outputs.version }}
if: ${{ !env.is_fork && env.is_main && endsWith(steps.properties.outputs.version, '-SNAPSHOT') }}
env:
ORG_GRADLE_PROJECT_githubUsername: ${{ secrets.PUBLISH_USERNAME }}
ORG_GRADLE_PROJECT_githubPassword: ${{ secrets.PUBLISH_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
run: ./gradlew publish -Psnapshot