Skip to content

Commit

Permalink
(ci) implement fabric / neoforge CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lilgallon committed Sep 30, 2024
1 parent b9bdfe7 commit 45ad3ab
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build-fabric.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: build fabric
on:
pull_request:
branches: [ "**" ]
paths:
- .github/workflows/build-fabric.yaml
- build.gradle.kts
- gradle.properties
- gradle/**
- common/**
- fabric/**
push:
branches: [ "main" ]
paths:
- .github/workflows/build-fabric.yaml
- build.gradle.kts
- gradle.properties
- gradle/**
- common/**
- fabric/**

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Gradle Build
run: ./gradlew :fabric:build
- name: capture build artifacts
if: ${{ runner.os == 'Linux' }}
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: fabric/build/libs/
45 changes: 45 additions & 0 deletions .github/workflows/build-neoforge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: build neoforge
on:
pull_request:
branches: [ "**" ]
paths:
- .github/workflows/build-neoforge.yaml
- build.gradle.kts
- gradle.properties
- gradle/**
- common/**
- fabric/**
push:
branches: [ "main" ]
paths:
- .github/workflows/build-neoforge.yaml
- build.gradle.kts
- gradle.properties
- gradle/**
- common/**
- fabric/**

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Gradle Build
run: ./gradlew :neoforge:build
- name: capture build artifacts
if: ${{ runner.os == 'Linux' }}
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: neoforge/build/libs/
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
![issues](https://img.shields.io/github/issues/lilgallon/horsestatsmod.svg)
![release](https://img.shields.io/github/release/lilgallon/horsestatsmod.svg)

[![build fabric](https://github.com/lilgallon/HorseStatsMod/actions/workflows/build-fabric.yaml/badge.svg)](https://github.com/lilgallon/HorseStatsMod/actions/workflows/build-fabric.yaml)
[![build neoforge](https://github.com/lilgallon/HorseStatsMod/actions/workflows/build-neoforge.yaml/badge.svg)](https://github.com/lilgallon/HorseStatsMod/actions/workflows/build-neoforge.yaml)

A lightweight mod that shows the horses' stats (health, jump height, speed, and slots for Llamas).

![demo](https://github.com/lilgallon/HorseStatsMod/raw/MC_1.19.x/.github/resources/demo-1.1.0.png)
Expand Down

0 comments on commit 45ad3ab

Please sign in to comment.