-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (42 loc) · 1.62 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
name: Patch and Build
on: [ push, pull_request ]
jobs:
build:
# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest
steps:
- name: Checkout Git Repository
uses: actions/checkout@v4
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v2
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
- name: Configure Git User Details
run: git config --global user.email "[email protected]" && git config --global user.name "Github Actions"
- name: Clean
run: ./gradlew clean
- name: Apply Patches
run: ./gradlew applyAllPatches --info
- name: Bundle
run: ./gradlew createMojmapBundlerJar --info
- name: Rename Artifact
run: mv cheetah-server/build/libs/cheetah-bundler-1.21.4-R0.1-SNAPSHOT-mojmap.jar cheetah-server/build/libs/cheetah-1.21.4.jar
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Cheetah-1.21.4
path: cheetah-server/build/libs/cheetah-1.21.4.jar
if-no-files-found: error