Files
mse-forge/.github/workflows/build.yml
angel d1fd5080c7
All checks were successful
Build Mod / build (push) Successful in 6m56s
workflow
2026-01-08 21:41:54 -06:00

54 lines
1.2 KiB
YAML

name: Build Mod
on:
push:
branches: [ "master", "main", "develop" ]
pull_request:
branches: [ "master", "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false
gradle-home-cache-cleanup: true
- name: Cache Forge resources
uses: actions/cache@v4
with:
path: |
~/.gradle/caches/forge_gradle
~/.gradle/caches/minecraft
key: ${{ runner.os }}-forge-${{ hashFiles('gradle.properties') }}
restore-keys: |
${{ runner.os }}-forge-
- name: Build with Gradle
run: ./gradlew build --no-daemon
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: more_spear_enchantments-${{ github.sha }}
path: build/libs/*.jar
retention-days: 30