-
Notifications
You must be signed in to change notification settings - Fork 6
68 lines (62 loc) · 1.72 KB
/
Copy pathgradle.yml
File metadata and controls
68 lines (62 loc) · 1.72 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
strategy:
matrix:
java: [ 25 ]
gradle: [ wrapper, current]
os: [ ubuntu-latest, macos-latest, windows-latest ]
include:
- java: 25
gradle: wrapper
os: ubuntu-latest
upload: true
runs-on: ${{ matrix.os }}
name: Java ${{ matrix.java }}, Gradle ${{ matrix.gradle }} on ${{ matrix.os}}
steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
submodules: true
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: ${{matrix.java}}
- name: Gradle Setup
if: ${{ !env.ACT }}
uses: gradle/actions/setup-gradle@v6
with:
gradle-version: ${{ matrix.gradle }}
- name: Gradle Setup Uncached
if: ${{ env.ACT }}
uses: gradle/actions/setup-gradle@v6
with:
gradle-version: ${{ matrix.gradle }}
cache-disabled: true
- run: gradle build
- name: Upload Artefact
if: ${{ matrix.upload }}
uses: actions/upload-artifact@v7
with:
path: |
build/libs/*.jar
!build/libs/*sources.jar
built:
runs-on: ubuntu-latest
needs: [build]
if: always()
steps:
- name: Success
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Failure
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1