mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-27 19:09:22 +00:00
71 lines
3.0 KiB
YAML
71 lines
3.0 KiB
YAML
name: Build Leaf 1.21.4
|
|
|
|
on:
|
|
push:
|
|
branches: [ "dev/1.21.4" ]
|
|
pull_request:
|
|
branches: [ "ver/1.21.4" ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@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" applyAllPatches --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" -Dpaperweight.debug=true createReobfPaperclipJar --stacktrace --no-daemon
|
|
|
|
- name: Rename Paperclip Jar
|
|
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: Publish API
|
|
if: github.event_name != 'pull_request'
|
|
continue-on-error: true
|
|
run: |
|
|
echo "REPO_USER=${{ secrets.REPO_USER }}" >> $GITHUB_ENV
|
|
export REPO_USER=${{ secrets.REPO_USER }}
|
|
echo "REPO_PASSWORD=${{ secrets.REPO_PASSWORD }}" >> $GITHUB_ENV
|
|
export REPO_PASSWORD=${{ secrets.REPO_PASSWORD }}
|
|
./gradlew publish
|
|
# TODO
|
|
# ./gradlew publishDevBundlePublicationToLeafRepository -PpublishDevBundle=true
|
|
|
|
- name: Upload Leaf
|
|
uses: actions/upload-artifact@main
|
|
with:
|
|
name: Leaf 1.21.4
|
|
path: ./leaf-1.21.4-*.jar
|
|
|
|
- name: Rename Leaf Jar
|
|
run: |
|
|
mv ./leaf-1.21.4-mojmap.jar ./leaf-1.21.4.jar
|
|
|
|
# TODO: marvinpinto/action-automatic-releases is archived, need to find new one
|
|
# Notes: create releases every time, similar changelogs with this, all commits for changelogs
|
|
- name: Release Leaf
|
|
if: github.event_name != 'pull_request'
|
|
uses: marvinpinto/action-automatic-releases@master
|
|
with:
|
|
title: "Leaf 1.21.4"
|
|
automatic_release_tag: "ver-1.21.4"
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
files: "./leaf-1.21.4.jar"
|
|
prerelease: true
|