File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and Upload JDA Bot
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ # 1. Checkout Repository
15+ - name : Checkout repository
16+ uses : actions/checkout@v4
17+
18+ # 2. Setup Java
19+ - name : Setup Java
20+ uses : actions/setup-java@v4
21+ with :
22+ distribution : temurin
23+ java-version : 21
24+
25+ # 3. Cache Gradle
26+ - name : Cache Gradle
27+ uses : actions/cache@v4
28+ with :
29+ path : |
30+ ~/.gradle/caches
31+ ~/.gradle/wrapper
32+ key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
33+ restore-keys : |
34+ ${{ runner.os }}-gradle-
35+
36+ # 4. Build ShadowJar
37+ - name : Build with Gradle ShadowJar
38+ run : ./gradlew shadowJar
39+
40+ # 5. Upload Artifact
41+ - name : Upload Bot JAR
42+ uses : actions/upload-artifact@v4
43+ with :
44+ name : jda-bot-jar
45+ path : build/libs/*-all.jar
You can’t perform that action at this time.
0 commit comments