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

cache gradle based on ./gradle.properties #49

cache gradle based on ./gradle.properties

cache gradle based on ./gradle.properties #49

Workflow file for this run

name: build
on:
workflow_dispatch:
pull_request:
push:
braches:
- main
- 1.20.0-1
- 1.20.2
- 1.20.4
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- name: Flake Check
run: nix flake check --impure
build:
runs-on: ubuntu-latest
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
strategy:
matrix:
loader:
- fabric
- neoforge
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 21
cache-dependency-path: ./gradle.properties
# - name: Setup Gradle
# uses: gradle/actions/setup-gradle@v3
- name: Build
run: ./gradlew ${{ matrix.loader }}:build
- name: Upload Jar Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.BRANCH_NAME }}-${{ matrix.loader }}
overwrite: true
path: |
${{ matrix.loader }}/build/libs/*.jar
!${{ matrix.loader }}/build/libs/*-sources.jar
!${{ matrix.loader }}/build/libs/*-shadow.jar