-
Notifications
You must be signed in to change notification settings - Fork 15
42 lines (37 loc) · 1.13 KB
/
gradle_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Gradle Build
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
build:
strategy:
matrix:
java: [ 17, 20 ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build --parallel --stacktrace
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/1.') && !startsWith(github.ref, 'refs/heads/dev/') && !startsWith(github.ref, 'refs/tags/v') }}
- name: Test
uses: gradle/gradle-build-action@v2
with:
arguments: runGameTestServer --stacktrace
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/1.') && !startsWith(github.ref, 'refs/heads/dev/') && !startsWith(github.ref, 'refs/tags/v') }}
- uses: actions/upload-artifact@v2
with:
name: Artifacts
path: ./build/libs/