add gradle build workflow
Some checks failed
github-mirror / push-github (push) Successful in 4s
Build / Gradle-Build (push) Failing after 1m2s

This commit is contained in:
tueem 2025-02-06 12:13:40 +01:00
parent de46e7625a
commit 9e80e06d18
Signed by: tueem
GPG Key ID: 65C8667EC17A88FB

View File

@ -0,0 +1,47 @@
name: Build
on:
push:
jobs:
Gradle-Build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '23'
check-latest: true
distribution: 'zulu'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
add-job-summary: always
cache-cleanup: on-success
- name: Cache Gradle dependencies
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build
run: chmod +x gradlew; ./gradlew assemble
- name: Move artifacts
run: mkdir artifacts; mv app/build/libs/*.jar artifacts;
- name: Upload artifact
uses: christopherhx/gitea-upload-artifact@v4
with:
name: artifacts
path: artifacts