mirror of
https://github.com/System-End/Discord-MC-Chat.git
synced 2026-04-19 22:05:11 +00:00
更新build workflow配置文件
This commit is contained in:
parent
2d97922905
commit
582de898b3
1 changed files with 11 additions and 20 deletions
31
.github/workflows/build.yml
vendored
31
.github/workflows/build.yml
vendored
|
|
@ -1,36 +1,27 @@
|
|||
name: build
|
||||
on: [ pull_request, push ]
|
||||
on: [ push ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
java: [ 17 ]
|
||||
os: [ ubuntu-latest ]
|
||||
runs-on: ${{ matrix.os }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
- name: Setup JDK ${{ matrix.java }}
|
||||
uses: actions/setup-java@v1
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
- name: Make Gradle Wrapper Executable
|
||||
if: ${{ runner.os != 'Windows' }}
|
||||
run: chmod +x ./gradlew
|
||||
java-version: 17
|
||||
- name: Build
|
||||
run: ./gradlew build
|
||||
uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: build
|
||||
- name: Find Correct JAR
|
||||
id: findjar
|
||||
if: ${{ runner.os == 'Linux' && matrix.java == '17' }}
|
||||
run: |
|
||||
output="$(find wrapper/build/libs/ ! -name "*-sources.jar" -type f -printf "%f\n")"
|
||||
echo "::set-output name=jarname::$output"
|
||||
- name: Capture Build Artifacts
|
||||
if: ${{ runner.os == 'Linux' && matrix.java == '17' }}
|
||||
uses: actions/upload-artifact@v2
|
||||
- name: Upload Build Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ steps.findjar.outputs.jarname }}
|
||||
path: wrapper/build/libs/${{ steps.findjar.outputs.jarname }}
|
||||
Loading…
Add table
Reference in a new issue