Skip to content

Add wi-zoom 1.5 build for 1.21.4 #4

Add wi-zoom 1.5 build for 1.21.4

Add wi-zoom 1.5 build for 1.21.4 #4

Workflow file for this run

# Adds the necessary Hugo metadata when an existing mod update is ported to a new Minecraft version.
name: Add Mod Port
run-name: Add ${{ github.event.inputs.mod }} ${{ github.event.inputs.mod_version }} build for ${{ github.event.inputs.mc_version }}
on:
workflow_dispatch:
inputs:
mod:
description: "Mod ID (as it appears in config.toml)"
required: true
modloader:
description: "Mod loader (fabric or neoforge)"
required: true
mod_version:
description: "Mod version (without v or -MC)"
required: true
mc_version:
description: "Minecraft version"
required: true
fapi_version:
description: "Fabric API version (if modloader is fabric)"
required: false
file_id:
description: "CurseForge file ID"
required: true
jobs:
update-post:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: scripts/requirements.txt
- name: Install dependencies
run: |
pip install -r scripts/requirements.txt
- name: Run add_mod_port.py
run: |
python scripts/add_mod_port.py \
"${{ github.event.inputs.mod }}" \
"${{ github.event.inputs.modloader }}" \
"${{ github.event.inputs.mod_version }}" \
"${{ github.event.inputs.mc_version }}" \
${{ github.event.inputs.modloader == 'fabric' && format('--fapi_version {0}', github.event.inputs.fapi_version) || '' }} \
"${{ github.event.inputs.file_id }}"
- name: Commit changes
run: |
MOD="${{ github.event.inputs.mod }}"
MOD_VERSION="${{ github.event.inputs.mod_version }}"
MC_VERSION="${{ github.event.inputs.mc_version }}"
MODLOADER="${{ github.event.inputs.modloader }}"
git config --local user.email "[email protected]"
git config --local user.name "Wurst-Bot"
git add .
git commit -m "[Wurst-Bot] Port $MOD $MOD_VERSION to Minecraft $MC_VERSION ($MODLOADER)"
git push