-
Notifications
You must be signed in to change notification settings - Fork 31
46 lines (40 loc) · 1.02 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
name: Build JAR
on:
workflow_dispatch:
push:
branches: [ '1.17' ]
paths:
- 'build.gradle'
- 'build.properties'
pull_request:
branches: [ '1.17' ]
paths:
- 'src/**'
- 'build.gradle'
- 'build.properties'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@master
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Setup JDK 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: Gradle Build
run: ./gradlew build
- name: Upload Build Artifact
uses: actions/upload-artifact@v2
with:
name: Generated JAR
path: build/libs/