Skip to content

Build 1.21.x-4.2.4

Build 1.21.x-4.2.4 #1

Workflow file for this run

name: 'Build 1.21.x'
run-name: Build 1.21.x-${{ inputs.version }}
on:
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true
default: '0.0.0-dev'
workflow_call:
inputs:
version:
required: true
type: string
jobs:
build-1-21-x:
runs-on: ubuntu-latest
defaults:
run:
working-directory: mc2discord-1.21.x
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'
- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-1.21.x-${{ runner.os }}-${{ hashFiles('**/gradle.properties', '**/build.gradle.kts', '**/settings.gradle', '**/gradle-wrapper.jar') }}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
env:
INPUT_VERSION: ${{ inputs.version }}
- uses: actions/upload-artifact@v3
with:
name: mc2discord-forge-1.21.x-${{ inputs.version }}
path: |
${{ github.workspace }}/mc2discord-1.21.x/forge/build/libs/
!${{ github.workspace }}/mc2discord-1.21.x/forge/build/libs/*-slim.jar
- uses: actions/upload-artifact@v3
with:
name: mc2discord-fabric-1.21.x-${{ inputs.version }}
path: |
${{ github.workspace }}/mc2discord-1.21.x/fabric/build/libs/
!${{ github.workspace }}/mc2discord-1.21.x/fabric/build/libs/*-all.jar