generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (41 loc) · 1.25 KB
/
build_mod.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
# Rebuild the mod both to catch errors and to produce
# a compiled jar for testing (or manual publishing)
name: build_mod
on: # run on any push to the supported version branches,
# or force building by opening a PR to anywhere
pull_request:
push:
branches:
- 1.20.5
- 1.20.4
- 1.20.0
- 1.19.4
- 1.19
jobs:
build_mod:
strategy:
matrix:
java: [ 21 ]
os: [ ubuntu-latest ] # have yet to come across a cross-platform Java build issue
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # TODO: try removing this after the initial release
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin' # is there a reason Fabric uses Microsoft?
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- name: capture build artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts
path: build/libs/