无线循环崩溃修复 #326
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Mod Build | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
java: [21] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Setup Java | |
uses: actions/[email protected] | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java }} | |
- name: Make Gradle Wrapper Executable | |
run: chmod +x ./gradlew | |
- name: Setup Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
- name: Build with Gradle | |
run: ./gradlew build --info | |
continue-on-error: false # 根据需要决定是否添加此选项 | |
- name: Find correct JAR | |
id: find-jar | |
run: | | |
output=$(ls build/libs/*.jar | grep -v '-dev\|-sources' | head -1) | |
echo "jarname=$output" >> $GITHUB_OUTPUT | |
- name: Update Build Artifacts | |
if: success() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-Mod | |
path: build/libs/ |