Skip to content
This repository was archived by the owner on Dec 14, 2024. It is now read-only.

Commit c69d2e2

Browse files
committed
add basic check & builds
1 parent 2e19714 commit c69d2e2

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/build.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: build
2+
on:
3+
workflow_dispatch:
4+
push:
5+
braches:
6+
- main
7+
- 1.20.0-1
8+
- 1.20.2
9+
- 1.20.4
10+
11+
jobs:
12+
check:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
- uses: cachix/install-nix-action@v27
18+
- name: Flake Check
19+
run: nix flake check --impure
20+
build:
21+
runs-on: ubuntu-latest
22+
env:
23+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
24+
strategy:
25+
matrix:
26+
loader:
27+
- fabric
28+
- neoforge
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v3
32+
- name: Setup Java
33+
uses: actions/setup-java@v4
34+
with:
35+
distribution: 'adopt'
36+
java-version: 21
37+
# - name: Setup Gradle
38+
# uses: gradle/actions/setup-gradle@v3
39+
- name: Build
40+
run: ./gradlew ${{ matrix.loader }}:build
41+
- name: Upload Jar Artifact
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: ${{ env.BRANCH_NAME }}-${{ matrix.loader }}-${{ github.sha }}
45+
path: |
46+
${{ matrix.loader }}/build/libs
47+
!${{ matrix.loader }}/build/libs/*-sources.jar
48+
!${{ matrix.loader }}/build/libs/*-shadow.jar
49+

0 commit comments

Comments
 (0)