Repository navigation
81 lines (69 loc) · 2.33 KB
/
Copy pathbuild.yml
File metadata and controls
81 lines (69 loc) · 2.33 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
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Build
on:
push:
branches:
- master
- main
- develop
- 'feature/**'
- 'task/**'
- 'fix/**'
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
name: Build + test on JDK 21
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true
- name: Build + tests (all modules) + shadowJar
run: ./gradlew --no-daemon build :plugin:shadowJar
- name: Publish test report
if: always()
uses: mikepenz/action-junit-report@v5
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
fail_on_failure: true
require_tests: false
- name: Resolve plugin JAR path
id: plugin_jar
# Skip the dev-only -thin jar; only the shaded fat jar ships.
run: echo "path=$(ls plugin/build/libs/AbstractMenus-*.jar | grep -v -- '-thin\.jar$' | head -n1)" >> "$GITHUB_OUTPUT"
- name: Resolve API JAR paths
id: api_jars
run: |
echo "binary=$(ls api/build/libs/AbstractMenus-api-*.jar | grep -v 'sources\|javadoc' | head -n1)" >> "$GITHUB_OUTPUT"
echo "sources=$(ls api/build/libs/AbstractMenus-api-*-sources.jar | head -n1)" >> "$GITHUB_OUTPUT"
echo "javadoc=$(ls api/build/libs/AbstractMenus-api-*-javadoc.jar | head -n1)" >> "$GITHUB_OUTPUT"
- name: Upload plugin shadow JAR
uses: actions/upload-artifact@v4
with:
name: AbstractMenus-jar
path: ${{ steps.plugin_jar.outputs.path }}
if-no-files-found: error
retention-days: 14
- name: Upload api artifacts
uses: actions/upload-artifact@v4
with:
name: AbstractMenus-api
path: |
${{ steps.api_jars.outputs.binary }}
${{ steps.api_jars.outputs.sources }}
${{ steps.api_jars.outputs.javadoc }}
if-no-files-found: error
retention-days: 14