-
Notifications
You must be signed in to change notification settings - Fork 5
49 lines (49 loc) · 1.45 KB
/
build.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
name: Build
on:
push:
branches:
- '*'
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
validate-gradle:
name: "Validate Gradle wrapper"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true # Clone with vs-core submodule
- uses: gradle/wrapper-validation-action@v1
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: true # Clone with vs-core submodule
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Cache Gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build and analyze
run: ./gradlew build --info
- name: Attach Fabric compilation artifacts
uses: actions/upload-artifact@v4
with:
name: fabric-build-libs
path: fabric/build/libs
- name: Attach Forge compilation artifacts
uses: actions/upload-artifact@v4
with:
name: forge-build-libs
path: forge/build/libs