-
Notifications
You must be signed in to change notification settings - Fork 42
68 lines (59 loc) · 2.81 KB
/
build-121.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Build Leaf 1.21
on:
push:
branches: [ "ver/1.21" ]
pull_request:
branches: [ "ver/1.21" ]
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 "[email protected]" && 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.21-R0.1-SNAPSHOT-mojmap.jar ./leaf-1.21-mojmap.jar
mv build/libs/leaf-paperclip-1.21-R0.1-SNAPSHOT-reobf.jar ./leaf-1.21-reobf.jar
# Publish manually instead of using workflow
# - name: Publish API
# if: github.event_name != 'pull_request'
# 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 :leaf-api:publish
# ./gradlew publishDevBundlePublicationToLeafRepository -PpublishDevBundle=true
- name: Upload Leaf
uses: actions/upload-artifact@main
with:
name: Leaf 1.21
path: ./leaf-1.21-*.jar
- name: Rename Paperclip Jar
run: |
mv ./leaf-1.21-mojmap.jar ./leaf-1.21.jar
- name: Release Leaf
if: github.event_name != 'pull_request'
uses: marvinpinto/action-automatic-releases@master
with:
title: "Leaf 1.21"
automatic_release_tag: "ver-1.21"
repo_token: "${{ secrets.GITHUB_TOKEN }}"
files: "./leaf-1.21.jar"
prerelease: false