Yatopia/.github/workflows/build.yml
Zoe 985b5655f5
Use modified toothpick for our build & patch system.
This has been in work for a bunch of time. Zoe ( duplexsystem or budgidiere, whatever ) has put a ton of work into this. 
We now have a bugfree build system that works flawlessly. 

Co-authored-by: Ivan Pekov <ivan@mrivanplays.com>
Co-authored-by: Simon Gardling <titaniumtown@gmail.com>
Co-authored-by: toinouH <toinouh2003@gmail.com>

P.s the one who merged this is ivan and not bud.
2021-01-21 12:58:52 +02:00

100 lines
2.5 KiB
YAML

name: Yatopia Build Script
on:
push:
paths-ignore:
- '*.md'
- 'Jenkinsfile'
branches:
- ver/1.16.5
- ver/1.16.4
- ver/1.16.3
- ver/1.16.2
- ver/1.16.1
- leaflight/ver/1.16.4
- leaflight/ver/1.16.5
pull_request:
paths-ignore:
- '*.md'
- 'Jenkinsfile'
branches:
- ver/1.16.5
- ver/1.16.4
- ver/1.16.3
- ver/1.16.1
- ver/1.16.2
- leaflight/ver/1.16.4
- leaflight/ver/1.16.5
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [15, 11, 8]
fail-fast: false
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.4.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Pull Gradle Cache
uses: actions/cache@v2
id: gradle-cache
with:
path: ~/.gradle
key: ${{ runner.os }}-maven-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}-java-${{ matrix.java }}
- name: Setup Yatopia Project
run: |
git config --global user.email "ci@github.com"
git config --global user.name "Github CI"
git config --global gc.auto 0
sudo chmod -R -f 777 ./gradlew
./gradlew initGitSubmodules
- name: Get MC Version
run: echo "::set-output name=mcver::$(cat "Paper/work/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)"
id: mcver
- name: Pull Minecraft Decompile Cache
uses: actions/cache@v2
id: decompile-cache
with:
path: Paper/work/Minecraft/${{ steps.mcver.outputs.mcver }}
key: ${{ steps.mcver.outputs.mcver }}-${{ runner.os }}-java-${{ matrix.java }}-minecraft-decomp
- name: Apply Patches
run: |
./gradlew setupUpstream
./gradlew applyPatches
- name: Pull Maven Cache
uses: actions/cache@v2
id: maven-cache
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- name: Build Yatopia
run: |
./gradlew paperclip
- name: Upload Artifact
if: github.ref != 'refs/heads/ver/1.16.4'
uses: actions/upload-artifact@v2
with:
name: Yatopia-${{ matrix.java }}
path: yatopia-1.16.5-paperclip.jar