-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.37 KB
/
gradle.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: "Build"
on:
push:
branches: [ "**" ]
tags-ignore: [ "**" ]
pull_request:
workflow_dispatch:
concurrency:
cancel-in-progress: true
group: build-${{ github.event.pull_request.number || github.ref }}
permissions:
issues: read
checks: write
contents: read
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
name: Run Build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v4
with:
java-version: 23
check-latest: true
distribution: 'zulu'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
add-job-summary: always
cache-cleanup: on-success
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Execute build and tests
run: ./gradlew build test shadowJar --stacktrace
- name: Publish test summary
if: always()
uses: EnricoMi/publish-unit-test-result-action@v2
with:
junit_files: "**/build/test-results/test/TEST-*.xml"
- name: Prepare artifact jar
run: cp cloudnet-rest-module/build/libs/cloudnet-rest.jar cloudnet-rest.jar
- name: Upload artifact jar
uses: actions/upload-artifact@v4
with:
name: CloudNet-Rest
path: cloudnet-rest.jar