forked from DeerGiteaMirror/DeerFolia
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.08 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
name: Java CI-CD with Gradle
on:
push:
paths:
- 'patches/**'
- 'gradle.properties'
- 'gradle/wrapper/gradle-wrapper.properties'
- 'build.gradle.kts'
- 'settings.gradle.kts'
- '.github/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "Pull & Checkout"
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "Set up JDK 17"
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
cache: 'gradle'
- name: "Config Git"
run: |
git config --global user.email "[email protected]"
git config --global user.name "actions"
- name: "Apply Patches"
run: ./gradlew applyPatches
- name: "Build Mojmap"
run: ./gradlew createMojmapPaperclipJar
- name: "Copy jar to staging"
run: mkdir staging && cp build/libs/*.jar staging
- uses: "softprops/action-gh-release@v2"
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
staging/*.jar