48 lines
2.2 KiB
YAML
48 lines
2.2 KiB
YAML
name: Build
|
|
on: push
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Git Repository
|
|
uses: actions/checkout@latest
|
|
- name: Validate Gradle Wrapper
|
|
uses: gradle/wrapper-validation-action@latest
|
|
- name: Set up JDK (GraalVM)
|
|
uses: graalvm/setup-graalvm@latest
|
|
with:
|
|
version: 'latest'
|
|
java-version: '17'
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Pull Gradle Cache
|
|
uses: actions/cache@latest
|
|
id: gradle-cache
|
|
with:
|
|
path: ~/.gradle
|
|
key: ${{ runner.os }}-maven-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}-java-${{ matrix.java }}
|
|
- name: Configure Git
|
|
run: |
|
|
git config --global user.email "no-reply@github.com"
|
|
git config --global user.name "Github Actions"
|
|
chmod +x gradlew
|
|
- name: Patch
|
|
run: |
|
|
./gradlew -Dorg.gradle.jvmargs="-Dfile.encoding=UTF-8 -Djdk.nio.maxCachedBufferSize=262144 -Dgraal.CompilerConfiguration=community -Dgraal.UsePriorityInlining=true -Dgraal.Vectorization=true -Dgraal.OptDuplication=true -Dgraal.SpeculativeGuardMovement=true -Dgraal.WriteableCodeCache=true --add-modules jdk.incubator.vector" applyPatches --stacktrace --no-daemon
|
|
- name: Build
|
|
run: |
|
|
./gradlew -Dorg.gradle.jvmargs="-Dfile.encoding=UTF-8 -Djdk.nio.maxCachedBufferSize=262144 -Dgraal.CompilerConfiguration=community -Dgraal.UsePriorityInlining=true -Dgraal.Vectorization=true -Dgraal.OptDuplication=true -Dgraal.SpeculativeGuardMovement=true -Dgraal.WriteableCodeCache=true --add-modules jdk.incubator.vector" createReobfPaperclipJar --stacktrace --no-daemon
|
|
- name: Archive Paperclip
|
|
uses: actions/upload-artifact@latest
|
|
with:
|
|
name: Mirai-1.19
|
|
path: build/libs/mirai-paperclip-1.19-R0.1-SNAPSHOT-reobf.jar
|
|
- name: Release
|
|
if: github.ref_name == 'ver/1.19'
|
|
uses: marvinpinto/action-automatic-releases@latest
|
|
with:
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
automatic_release_tag: '1.19'
|
|
prerelease: false
|
|
title: 'Mirai 1.19'
|
|
files: build/libs/mirai-paperclip-1.19-R0.1-SNAPSHOT-reobf.jar
|