Skip to content

Add Wurst 7.46.5 build for 1.21.1 #15

Add Wurst 7.46.5 build for 1.21.1

Add Wurst 7.46.5 build for 1.21.1 #15

# Adds the necessary Jekyll metadata when an existing Wurst Client update is ported to a new Minecraft version.
name: Add Wurst Port
run-name: Add Wurst ${{ github.event.inputs.wurst_version }} build for ${{ github.event.inputs.mc_version }}
on:
workflow_dispatch:
inputs:
wurst_version:
description: "Wurst version (without v or -MC)"
required: true
mc_version:
description: "Minecraft version"
required: true
fapi_version:
description: "Fabric API version"
required: true
announce:
description: "Announce on WurstForum (only works for backports)"
required: false
default: "false"
distinct_id:
description: "Automatically set by the return-dispatch action (leave blank if running manually)"
required: false
permissions:
# To push the automated commit.
contents: write
jobs:
update-post:
runs-on: ubuntu-latest
steps:
- name: Echo distinct ID ${{ github.event.inputs.distinct_id }}
run: echo ${{ github.event.inputs.distinct_id }}
- 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_wurst_port.py
run: |
python _scripts/add_wurst_port.py "${{ github.event.inputs.wurst_version }}" "${{ github.event.inputs.mc_version }}" "${{ github.event.inputs.fapi_version }}"
# - name: Commit changes
# run: |
# git config --local user.email "[email protected]"
# git config --local user.name "Wurst-Bot"
# git add .
# git commit -m "[Wurst-Bot] Port Wurst ${{ github.event.inputs.wurst_version }} to Minecraft ${{ github.event.inputs.mc_version }}"
# git push
announce:
runs-on: ubuntu-latest
needs: update-post
if: ${{ github.event.inputs.announce == 'true' }}
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 announce_wurst_backport.py
id: announce
env:
WURSTFORUM_TOKEN: ${{ secrets.WF_BOT_TOKEN }}
run: |
python _scripts/announce_wurst_backport.py "${{ github.event.inputs.wurst_version }}" "${{ github.event.inputs.mc_version }}"
- name: Write summary
run: |
echo "Discussion ID: ${{ steps.announce.outputs.discussion_id }}" >> $GITHUB_STEP_SUMMARY
echo "Link: <https://wurstforum.net/d/${{ steps.announce.outputs.discussion_id }}>" >> $GITHUB_STEP_SUMMARY