mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-28 11:29:12 +00:00
--------- Co-authored-by: Lumine1909 <133463833+Lumine1909@users.noreply.github.com> Co-authored-by: LittleChest <81231195+LittleChest@users.noreply.github.com>
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
name: Leaves Test CI
|
|
|
|
on:
|
|
push:
|
|
branches-ignore: [ master ]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Get repository
|
|
uses: actions/checkout@v4
|
|
- name: Get JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: "21"
|
|
distribution: "zulu"
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v3
|
|
with:
|
|
add-job-summary: never
|
|
generate-job-summary: false
|
|
cache-read-only: false
|
|
- name: Setup Git Config
|
|
run: |
|
|
git config --global user.email "ci@leavesmc.org"
|
|
git config --global user.name "LeavesMC CI"
|
|
- name: Apply Patches
|
|
run: ./gradlew applyPatches
|
|
- name: Create Leavesclip Jar
|
|
run: ./gradlew createMojmapLeavesclipJar
|
|
- name: Move Jar
|
|
run: |
|
|
prop() {
|
|
grep "${1}" gradle.properties | cut -d'=' -f2 | sed 's/\r//'
|
|
}
|
|
|
|
jarName="leaves-$(prop mcVersion).jar"
|
|
mv build/libs/Leaves-leavesclip-"$(prop version)"-mojmap.jar "$jarName"
|
|
echo "jar=$jarName" >> "$GITHUB_ENV"
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ env.jar }}
|
|
path: ${{ env.jar }}
|