Skip to content

Run MC

Run MC #1

Workflow file for this run

name: Run MC
on:
workflow_dispatch:
inputs:
mc:
description: 'The MC version to to use'
required: true
default: '1.20.4'
modloader:
description: 'The modloader to install with HeadlessMc (forge, neoforge or fabric)'
required: true
default: 'forge'
regex:
description: 'Regex to match the MC version to launch (forge is like 1.20.4-forge and fabric starts with fabric-1.20)'
required: true
default: 'forge.*1.20.4'
mc-runtime-test:
description: 'The MC-Runtime-Test jar to download (none, lexforge, fabric or neoforge).'
required: true
default: 'lexforge'
java:
description: 'The Java version to use'
required: true
default: '17'
java-distribution:
description: 'The Java distribution to use'
required: false
default: 'adopt'
xvfb:
description: 'Runs the game with Xvfb, if false, you should probably use the -lwjgl option in headlessmc.'
required: false
default: 'false'
type: string
headlessmc-command:
description: 'Arguments for the headlessmc command.'
required: false
default: '-lwjgl --jvm -Djava.awt.headless=true'
type: string
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 8
distribution: temurin
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build
run: ./gradlew build
- name: Copy launcher jar
run: cp build/libs/headlessmc-launcher-*.jar ./headlessmc-launcher.jar
- name: List mods
run: ls run/mods
- name: Run the MC client
uses: 3arthqu4ke/mc-runtime-test@2.1.0
with:
mc: ${{ github.event.inputs.mc }}
modloader: ${{ github.event.inputs.modloader }}
regex: ${{ github.event.inputs.regex }}
java: ${{ github.event.inputs.java }}
java-distribution: ${{ github.event.inputs.java-distribution }}
mc-runtime-test: ${{ github.event.inputs.mc-runtime-test }}
xvfb: ${{ github.event.inputs.xvfb }}
headlessmc_command: ${{ github.event.inputs.headlessmc-command }}
download-hmc: false