Yatopia/.github/workflows/build.yml
2020-09-29 12:06:40 -05:00

67 lines
1.6 KiB
YAML

name: Yatopia Build Script
on:
push:
paths-ignore:
- '*.md'
branches:
- ver/1.16.3
- ver/1.16.2
- ver/1.16.1
- dev/ver/1.16.3
pull_request:
paths-ignore:
- '*.md'
branches:
- ver/1.16.3
- ver/1.16.1
- ver/1.16.2
- dev/ver/1.16.3
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [15, 11, 8]
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 Maven Cache
uses: actions/cache@v2
id: maven-cache
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- uses: s4u/maven-settings-action@v2.1.0
name: Use ${{ matrix.java }} as the java target
with:
properties: '[{"maven.compiler.target": "${{ matrix.java }}"}]'
- name: Setup Yatopia Project
run: |
git config --global user.email "ci@github.com"
git config --global user.name "Github CI"
sudo chmod -R -f 777 scripts
./yatopia init
- name: Build Yatopia
run: |
./yatopia full
- name: Upload Artifact
if: github.ref != 'refs/heads/ver/1.16.3'
uses: actions/upload-artifact@v2
with:
name: Yatopia-${{ matrix.java }}
path: yatopia-1.16.3-paperclip.jar