51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
name: Gradle Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ "**" ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up JDK 8
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '8'
|
|
distribution: 'temurin'
|
|
|
|
- name: Load Cache
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v4
|
|
with:
|
|
cache-read-only: ${{ github.ref != 'refs/heads/1.12.2' }}
|
|
|
|
- name: Grant execute permission for gradlew
|
|
run: chmod +x gradlew
|
|
|
|
- name: Build with Gradle
|
|
run: ./gradlew build --max-workers=1 --no-daemon
|
|
|
|
- name: Upload build artifacts
|
|
if: success()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: build-artifacts
|
|
path: build/libs/*.jar
|
|
retention-days: 30
|