2020-08-01 18:14:57 +02:00
|
|
|
name: Yatopia Build Script
|
2020-02-26 17:29:12 +01:00
|
|
|
|
2020-07-18 16:16:33 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- '*.md'
|
2020-07-18 16:27:44 +02:00
|
|
|
branches:
|
2020-09-11 08:03:00 +02:00
|
|
|
- ver/1.16.3
|
2020-08-12 15:40:19 +02:00
|
|
|
- ver/1.16.2
|
2020-08-13 17:53:32 +02:00
|
|
|
- ver/1.16.1
|
2020-09-29 19:06:40 +02:00
|
|
|
- dev/ver/1.16.3
|
2020-07-18 16:16:33 +02:00
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- '*.md'
|
2020-07-18 16:27:44 +02:00
|
|
|
branches:
|
2020-09-11 08:03:00 +02:00
|
|
|
- ver/1.16.3
|
2020-08-13 17:53:32 +02:00
|
|
|
- ver/1.16.1
|
2020-08-12 15:40:19 +02:00
|
|
|
- ver/1.16.2
|
2020-09-29 19:06:40 +02:00
|
|
|
- dev/ver/1.16.3
|
2020-02-26 17:29:12 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2020-05-23 13:21:39 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-09-20 07:42:29 +02:00
|
|
|
java: [15, 11, 8]
|
2020-05-23 13:21:39 +02:00
|
|
|
|
2020-02-26 17:29:12 +01:00
|
|
|
steps:
|
2020-07-18 16:16:33 +02:00
|
|
|
- name: Cancel Previous Runs
|
2020-07-18 18:59:48 +02:00
|
|
|
uses: styfle/cancel-workflow-action@0.4.1
|
2020-07-18 16:16:33 +02:00
|
|
|
with:
|
|
|
|
access_token: ${{ github.token }}
|
2020-07-18 18:57:55 +02:00
|
|
|
- uses: actions/checkout@v2
|
2020-05-23 13:21:39 +02:00
|
|
|
- name: Set up JDK ${{ matrix.java }}
|
2020-07-18 18:57:55 +02:00
|
|
|
uses: actions/setup-java@v1
|
2020-03-21 17:32:08 +01:00
|
|
|
with:
|
2020-05-23 13:21:39 +02:00
|
|
|
java-version: ${{ matrix.java }}
|
2020-07-15 22:06:37 +02:00
|
|
|
- name: Pull Maven Cache
|
2020-07-18 18:03:26 +02:00
|
|
|
uses: actions/cache@v2
|
2020-07-15 22:06:37 +02:00
|
|
|
id: maven-cache
|
2020-07-11 22:31:40 +02:00
|
|
|
with:
|
|
|
|
path: ~/.m2/repository
|
|
|
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: ${{ runner.os }}-maven-
|
2020-07-18 19:45:04 +02:00
|
|
|
- uses: s4u/maven-settings-action@v2.1.0
|
2020-07-17 17:39:18 +02:00
|
|
|
name: Use ${{ matrix.java }} as the java target
|
2020-07-17 05:18:15 +02:00
|
|
|
with:
|
2020-07-17 17:39:18 +02:00
|
|
|
properties: '[{"maven.compiler.target": "${{ matrix.java }}"}]'
|
2020-08-01 18:14:57 +02:00
|
|
|
- name: Setup Yatopia Project
|
2020-07-15 22:06:37 +02:00
|
|
|
run: |
|
|
|
|
git config --global user.email "ci@github.com"
|
|
|
|
git config --global user.name "Github CI"
|
2020-08-03 18:48:42 +02:00
|
|
|
sudo chmod -R -f 777 scripts
|
|
|
|
./yatopia init
|
2020-08-01 18:14:57 +02:00
|
|
|
- name: Build Yatopia
|
2020-02-26 17:29:12 +01:00
|
|
|
run: |
|
2020-08-03 18:48:42 +02:00
|
|
|
./yatopia full
|
2020-09-20 07:42:29 +02:00
|
|
|
- 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
|
|
|
|
|