mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-26 18:39:23 +00:00
63 lines
2.6 KiB
YAML
63 lines
2.6 KiB
YAML
name: Build Leaf 1.20.6
|
|
|
|
on:
|
|
push:
|
|
branches: [ "ver/1.20.6" ]
|
|
pull_request:
|
|
branches: [ "ver/1.20.6" ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
- uses: gradle/wrapper-validation-action@main
|
|
- name: Set up JDK
|
|
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="-Dgraal.CompilerConfiguration=enterprise -Dgraal.UsePriorityInlining=true -Dgraal.Vectorization=true -Dgraal.OptDuplication=true --add-modules jdk.incubator.vector" applyPatches --stacktrace --no-daemon
|
|
- name: Create MojmapPaperclipJar
|
|
run: ./gradlew -Dorg.gradle.jvmargs="-Dgraal.CompilerConfiguration=enterprise -Dgraal.UsePriorityInlining=true -Dgraal.Vectorization=true -Dgraal.OptDuplication=true --add-modules jdk.incubator.vector" createMojmapPaperclipJar --stacktrace --no-daemon
|
|
- name: Create ReobfPaperclipJar
|
|
run: ./gradlew -Dorg.gradle.jvmargs="-Dgraal.CompilerConfiguration=enterprise -Dgraal.UsePriorityInlining=true -Dgraal.Vectorization=true -Dgraal.OptDuplication=true --add-modules jdk.incubator.vector" createReobfPaperclipJar --stacktrace --no-daemon
|
|
|
|
- name: Rename Paperclip Jar
|
|
run: |
|
|
mv build/libs/leaf-paperclip-1.20.6-R0.1-SNAPSHOT-mojmap.jar ./leaf-1.20.6-mojmap.jar
|
|
mv build/libs/leaf-paperclip-1.20.6-R0.1-SNAPSHOT-reobf.jar ./leaf-1.20.6-reobf.jar
|
|
|
|
# - name: Publish API
|
|
# if: github.event_name != 'pull_request'
|
|
# run: |
|
|
# ./gradlew :leaf-api:publish
|
|
# ./gradlew publishDevBundlePublicationToLeafRepository -PpublishDevBundle=true
|
|
# env:
|
|
# ORG_GRADLE_PROJECT_leafUsername: ${{ secrets.REPO_USER }}
|
|
# ORG_GRADLE_PROJECT_leafPassword: ${{ secrets.REPO_PASSWORD }}
|
|
|
|
- name: Upload Leaf
|
|
uses: actions/upload-artifact@main
|
|
with:
|
|
name: Leaf 1.20.6
|
|
path: ./leaf-1.20.6-*.jar
|
|
|
|
- name: Release Leaf
|
|
if: github.event_name != 'pull_request'
|
|
uses: marvinpinto/action-automatic-releases@master
|
|
with:
|
|
title: "Leaf 1.20.6"
|
|
automatic_release_tag: "ver-1.20.6"
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
files: "./leaf-1.20.6-*.jar"
|
|
prerelease: false
|