mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-26 02:19:19 +00:00
48 lines
1.7 KiB
YAML
48 lines
1.7 KiB
YAML
name: Build Pull Request
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [ "ver/1.21.4" ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
GRAALVM_ARGS: "-Dgraal.CompilerConfiguration=enterprise -Dgraal.UsePriorityInlining=true -Dgraal.Vectorization=true -Dgraal.OptDuplication=true --add-modules jdk.incubator.vector"
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@main
|
|
|
|
- name: Set up GraalVM JDK 21
|
|
uses: graalvm/setup-graalvm@main
|
|
with:
|
|
java-version: 21
|
|
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
cache: gradle
|
|
|
|
- name: Grant execute permission for gradlew
|
|
run: chmod +x gradlew
|
|
- name: Configure Git
|
|
run: |
|
|
git config --global user.email "no-reply@github.com"
|
|
git config --global user.name "Github Actions"
|
|
|
|
- name: Apply patches
|
|
run: ./gradlew -Dorg.gradle.jvmargs="${{ env.GRAALVM_ARGS }}" applyAllPatches --stacktrace --no-daemon
|
|
- name: Create MojmapPaperclipJar
|
|
run: ./gradlew -Dorg.gradle.jvmargs="${{ env.GRAALVM_ARGS }}" createMojmapPaperclipJar --stacktrace --no-daemon
|
|
- name: Create ReobfPaperclipJar
|
|
run: ./gradlew -Dorg.gradle.jvmargs="${{ env.GRAALVM_ARGS }}" -Dpaperweight.debug=true createReobfPaperclipJar --stacktrace --no-daemon
|
|
|
|
- name: Rename Paperclip JARs
|
|
run: |
|
|
mv leaf-server/build/libs/leaf-paperclip-1.21.4-R0.1-SNAPSHOT-mojmap.jar ./leaf-1.21.4-mojmap.jar
|
|
mv leaf-server/build/libs/leaf-paperclip-1.21.4-R0.1-SNAPSHOT-reobf.jar ./leaf-1.21.4-reobf.jar
|
|
|
|
- name: Upload Leaf as build artifact
|
|
uses: actions/upload-artifact@main
|
|
with:
|
|
name: Leaf 1.21.4
|
|
path: ./leaf-1.21.4-*.jar
|