-
-
Notifications
You must be signed in to change notification settings - Fork 112
41 lines (32 loc) · 1.13 KB
/
Copy pathbuild.yml
File metadata and controls
41 lines (32 loc) · 1.13 KB
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
# Builds the project with every commit to confirm that the mod works.
# Based on fabric-example-mod's workflow, with more comments.
name: build
on: [pull_request, push]
jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [21] # Current Java LTS & minimum supported by Minecraft
# Test on both Linux and Windows
os: [ubuntu-24.04, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: microsoft
- name: setup gradle
uses: gradle/actions/setup-gradle@v4
- name: build
run: ./gradlew build
- name: capture build artifacts
# Only capture artifacts from one OS (Linux)
if: ${{ runner.os == 'Linux' && matrix.java == '21' }} # Only upload artifacts built from latest java on one OS
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/