Skip to content

Commit dc07bc2

Browse files
committed
Update .github workflow for gradle
1 parent 935ef35 commit dc07bc2

1 file changed

Lines changed: 7 additions & 13 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Release Build
22

33
on:
44
release:
5-
types: [created]
5+
types: [ created ]
66

77
jobs:
88
build:
@@ -17,24 +17,18 @@ jobs:
1717
with:
1818
java-version: '21'
1919
distribution: 'temurin'
20-
cache: maven
20+
cache: gradle
2121

22-
- name: Build Spigot with BuildTools
23-
run: |
24-
mkdir -p buildtools
25-
cd buildtools
26-
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
27-
java -jar BuildTools.jar --rev 1.21.10 --remapped
28-
cd ..
29-
timeout-minutes: 30
22+
- name: Grant execute permission for gradlew
23+
run: chmod +x gradlew
3024

31-
- name: Build with Maven
32-
run: mvn clean package
25+
- name: Build with Gradle
26+
run: ./gradlew build --no-daemon
3327

3428
- name: Find JAR file
3529
id: find_jar
3630
run: |
37-
JAR_FILE=$(ls target/*.jar | grep -v 'remapped-obf.jar' | grep -v 'original-' | tail -n 1)
31+
JAR_FILE=$(ls build/libs/*.jar | tail -n 1)
3832
echo "jar_file=$JAR_FILE" >> $GITHUB_OUTPUT
3933
echo "jar_name=$(basename $JAR_FILE)" >> $GITHUB_OUTPUT
4034

0 commit comments

Comments
 (0)