-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (37 loc) · 1.01 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
name: Build
on:
workflow_dispatch:
push:
paths: # Only build if a build file is changed
- 'build.gradle'
- 'build.properties'
pull_request:
paths: # Build on any changes
- '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
- uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '16'
- name: Gradle Build
run: ./gradlew build
- name: Upload Build Artifact
uses: actions/upload-artifact@v2
with:
name: Built JAR
path: build/libs/