-
Notifications
You must be signed in to change notification settings - Fork 7
59 lines (51 loc) · 1.21 KB
/
build.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Build
on:
workflow_dispatch:
push:
branches:
- '1.20.1'
tags-ignore:
- '**'
paths:
- 'gradle/**'
- '**.java'
- '**.kts'
- '**.properties'
- '**/build.yml'
pull_request:
branches:
- '1.20.1'
paths:
- 'gradle/**'
- '**.java'
- '**.kts'
- '**.properties'
- '**/build.yml'
env:
JAVA_DIST: 'zulu'
JAVA_VERSION: 17
jobs:
build:
name: Build
runs-on: ubuntu-latest
if: |
!contains(github.event.head_commit.message, '[skip build]')
steps:
- name: Clone Repository
uses: actions/checkout@v3
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DIST }}
cache: gradle
- name: Cleanup Gradle Cache
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
- name: Make Gradle executable
run: chmod +x ./gradlew
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build
run: ./gradlew build --stacktrace