mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-09 20:31:41 +01:00
70 lines
1.7 KiB
YAML
70 lines
1.7 KiB
YAML
name: Yatopia Build Script
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- '*.md'
|
|
- 'Jenkinsfile'
|
|
pull_request:
|
|
paths-ignore:
|
|
- '*.md'
|
|
- 'Jenkinsfile'
|
|
|
|
jobs:
|
|
validation:
|
|
name: "Gradle Wrapper Validation"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: gradle/wrapper-validation-action@v1
|
|
|
|
build:
|
|
needs: validation
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
java: [ '16' ]
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up JDK ${{ matrix.Java }}
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: 'adopt'
|
|
java-version: ${{ matrix.java }}
|
|
|
|
- name: Pull Gradle Cache
|
|
uses: actions/cache@v2
|
|
id: gradle-cache
|
|
with:
|
|
path: ~/.gradle
|
|
key: ${{ runner.os }}-mavenCache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}-openjdk-${{ matrix.java }}
|
|
|
|
- name: Configure Git
|
|
run: |
|
|
git config --global user.email "ci@github.com"
|
|
git config --global user.name "Github CI"
|
|
git config --global gc.auto 0
|
|
|
|
- name: Apply Patches
|
|
run: |
|
|
./gradlew applyPatches
|
|
|
|
- name: Pull Maven Cache
|
|
uses: actions/cache@v2
|
|
id: maven-cache
|
|
with:
|
|
path: ~/.m2/repository
|
|
key: ${{ runner.os }}-mavenCache-${{ hashFiles('**/pom.xml') }}
|
|
|
|
- name: Build Yatopia
|
|
run: |
|
|
./gradlew generatePaperclipPatch
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Yatopia-${{ matrix.java }}
|
|
path: yatopia-1.17-paperclip.jar
|
|
|