-
Notifications
You must be signed in to change notification settings - Fork 116
43 lines (38 loc) · 1.21 KB
/
Copy pathgradle_build.yml
File metadata and controls
43 lines (38 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: "Gradle Build"
on:
push:
branches:
- "**"
pull_request:
concurrency: build-${{ github.sha }}
jobs:
build:
strategy:
matrix:
java: [ 25 ]
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Set up Java"
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: ${{ matrix.java }}
- name: "Set up Gradle"
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/1.') && !startsWith(github.ref, 'refs/heads/dev/') && !startsWith(github.ref, 'refs/tags/v') }}
- name: "Handle Loom Cache"
uses: actions/cache@v4
with:
path: "**/.gradle/loom-cache"
key: "${{ runner.os }}-gradle-${{ hashFiles('**/libs.versions.*', '**/*.gradle*', '**/gradle-wrapper.properties') }}"
restore-keys: "${{ runner.os }}-gradle-"
- name: "Build with Gradle"
run: ./gradlew build --parallel --stacktrace
- name: "Upload artifacts"
uses: actions/upload-artifact@v4
with:
name: Artifacts_j${{ matrix.java }}
path: ./build/libs/