-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 967 Bytes
/
build.yml
File metadata and controls
42 lines (34 loc) · 967 Bytes
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: Build
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
cache: gradle
- name: Make Gradle wrapper executable
run: chmod +x ./gradlew
- name: Build shadowJar
run: ./gradlew shadowJar
- name: Determine jar name
id: jar
shell: bash
run: |
JAR_PATH="$(ls -1 build/libs/*-all.jar | head -n 1)"
JAR_FILE="$(basename "$JAR_PATH")"
echo "path=$JAR_PATH" >> "$GITHUB_OUTPUT"
echo "name=$JAR_FILE" >> "$GITHUB_OUTPUT"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.jar.outputs.name }}
path: ${{ steps.jar.outputs.path }}
if-no-files-found: error