-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (59 loc) · 1.85 KB
/
build-gradle.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
60
name: Build
on: [push, pull_request]
jobs:
build-all:
strategy:
matrix:
java: [8]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Initalize git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github CI"
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Fetch paper commit
id: paper-version
run: echo "::set-output name=commit::$(git rev-parse @:./Paper)"
- uses: actions/cache@v1
name: Cache paper
id: cache-paper
with:
path: Paper
key: ${{ runner.os }}-paper-${{ steps.paper-version.outputs.commit }}
- name: Setup paper
if: steps.cache-paper.outputs.cache-hit != 'true'
run: ./gradlew ilbluInit
- name: Setup workspace
run: ./gradlew ilbluApplyPatches
- uses: actions/cache@v1
name: Cache gradle
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v1
name: Cache maven
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Gradle
id: build
run: ./gradlew jar sourcesJar javadocJar shadowJar ilbluPaperclip
- name: Upload API Artifact
uses: actions/upload-artifact@v1
with:
name: ibento-api
path: Ibento-API/build/libs/
- name: Upload Paperclip Artifact
uses: actions/upload-artifact@v1
with:
name: ibento-paperclip
path: ibento-paperclip.jar