不再区分Active和Compat版本(由于目前来看一直是同步更新,因此似乎没有必要这么做) #617
Workflow file for this run
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: build | |
on: [ pull_request, push ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 21 | |
- name: Validate Gradle Wrapper | |
uses: gradle/actions/wrapper-validation@v3 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Make Gradle Wrapper Executable | |
run: chmod +x ./gradlew | |
- name: Clean | |
run: ./gradlew clean | |
- name: Build | |
run: ./gradlew build | |
- name: Get Short Commit Hash | |
id: get_short_commit_hash | |
run: | | |
short_sha=$(echo ${GITHUB_SHA} | cut -c1-7) | |
echo "short_sha=$short_sha" >> $GITHUB_OUTPUT | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Discord-MC-Chat ${{ steps.get_short_commit_hash.outputs.short_sha }} | |
path: build/*.jar |