Yatopia/.github/workflows/build.yml

70 lines
1.7 KiB
YAML
Raw Normal View History

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-10-30 19:41:56 +01:00
- 'Jenkinsfile'
2020-07-18 16:16:33 +02:00
pull_request:
paths-ignore:
- '*.md'
2020-10-30 19:41:56 +01:00
- 'Jenkinsfile'
2021-01-24 05:30:54 +01:00
2020-02-26 17:29:12 +01:00
jobs:
validation:
name: "Gradle Wrapper Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
2020-02-26 17:29:12 +01:00
build:
needs: validation
2020-02-26 17:29:12 +01:00
runs-on: ubuntu-latest
strategy:
matrix:
2021-06-14 21:11:54 +02:00
java: [ '16' ]
fail-fast: false
2020-02-26 17:29:12 +01:00
steps:
2020-07-18 18:57:55 +02:00
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.Java }}
uses: actions/setup-java@v2
2020-03-21 17:32:08 +01:00
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}
- name: Pull Gradle Cache
2020-07-18 18:03:26 +02:00
uses: actions/cache@v2
id: gradle-cache
2020-07-11 22:31:40 +02:00
with:
path: ~/.gradle
key: ${{ runner.os }}-mavenCache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}-openjdk-${{ matrix.java }}
2021-06-14 21:23:58 +02:00
- 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') }}
2020-08-01 18:14:57 +02:00
- name: Build Yatopia
2020-02-26 17:29:12 +01:00
run: |
2021-06-14 21:23:58 +02:00
./gradlew generatePaperclipPatch
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: Yatopia-${{ matrix.java }}
2021-06-14 21:23:58 +02:00
path: yatopia-1.17-paperclip.jar