Skip to content

Commit baad9d7

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 7edb260 + 2926ae3 commit baad9d7

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/build.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Automatically build the project and run any configured tests for every push
2+
# and submitted pull request. This can help catch issues that only occur on
3+
# certain platforms or Java versions, and provides a first line of defence
4+
# against bad commits.
5+
6+
name: build
7+
on: [pull_request, push]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
matrix:
13+
# Use these Java versions
14+
java: [
15+
17 # Current Java LTS & minimum supported by Minecraft
16+
]
17+
# and run on both Linux and Windows
18+
os: [ubuntu-22.04, windows-2022]
19+
runs-on: ${{ matrix.os }}
20+
steps:
21+
- name: checkout repository
22+
uses: actions/checkout@v3
23+
- name: validate gradle wrapper
24+
uses: gradle/wrapper-validation-action@v1
25+
- name: setup jdk ${{ matrix.java }}
26+
uses: actions/setup-java@v3
27+
with:
28+
java-version: ${{ matrix.java }}
29+
distribution: 'microsoft'
30+
- name: make gradle wrapper executable
31+
if: ${{ runner.os != 'Windows' }}
32+
run: chmod +x ./gradlew
33+
- name: build
34+
run: ./gradlew build
35+
- name: capture build artifacts
36+
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS
37+
uses: actions/upload-artifact@v3
38+
with:
39+
name: Artifacts
40+
path: build/libs/

0 commit comments

Comments
 (0)