mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
34 lines
1007 B
YAML
34 lines
1007 B
YAML
name: Build
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- "ver/**"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
if: "!contains(github.event.commits[0].message, '[ci-skip]')"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 21
|
|
cache: 'gradle'
|
|
- uses: gradle/wrapper-validation-action@v2
|
|
- uses: gradle/actions/setup-gradle@v3
|
|
- name: Configure Git
|
|
run: git config --global user.email "no-reply@github.com" && git config --global user.name "Github Actions"
|
|
- name: Apply Patches
|
|
run: ./gradlew applyPatches --no-daemon --stacktrace
|
|
- name: Build
|
|
run: ./gradlew build --no-daemon --stacktrace
|
|
- name: Rebuild on Failure
|
|
if: ${{ failure() }}
|
|
run: |
|
|
./gradlew clean cleanCache
|
|
./gradlew applyPatches --no-daemon --stacktrace
|
|
./gradlew build --no-daemon --stacktrace
|