forked from snowleopard1863/Ap-Turrets
-
Notifications
You must be signed in to change notification settings - Fork 5
72 lines (65 loc) · 2.05 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Java CI
on:
workflow_dispatch:
push:
pull_request:
jobs:
# Build AP-Turrets
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout AP-Turrets
uses: actions/checkout@v4
with:
path: AP-Turrets
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Checkout Movecraft-Combat
uses: actions/checkout@v3
with:
repository: 'APDevTeam/Movecraft-Combat'
path: Movecraft-Combat
ref: 'main'
- name: Checkout Movecraft-WorldGuard
uses: actions/checkout@v3
with:
repository: 'APDevTeam/Movecraft-WorldGuard'
path: Movecraft-WorldGuard
ref: 'main'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
build-scan-terms-of-use-agree: "yes"
- name: Cache Maven packages
id: cacheMain
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2
restore-keys: ${{ runner.os }}-m2
# Build Movecraft-Combat
- name: Build Movecraft-Combat
run: mvn -B package -T 1C --file Movecraft-Combat/pom.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Build Movecraft-WorldGuard
- name: Build Movecraft-WorldGuard
run: mvn -B package -T 1C --file Movecraft-WorldGuard/pom.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build AP-Turrets
run: cd AP-Turrets && ./gradlew clean build
- name: Stage jar
run: mkdir staging && cp AP-Turrets/build/libs/AP-Turrets.jar staging && mv staging/AP-Turrets.jar staging/AP-Turrets_$GITHUB_SHA.jar
- name: Upload jar
uses: actions/upload-artifact@v4
with:
name: AP-Turrets_Dev-Build
path: staging/AP-Turrets_*.jar