Skip to content

update workflows

update workflows #4

name: Generate Translation Files
on:
workflow_dispatch:
inputs:
min_version:
description: 'Minimum Minecraft version (client-side; 1.19.4 = earliest vb.* key support)'
required: true
default: '1.21.4'
type: string
max_version:
description: 'Maximum Minecraft version (server-side; leave blank to auto-detect from mappings)'
required: false
default: ''
type: string
workflow_call:
inputs:
min_version:
required: true
type: string
max_version:
required: false
type: string
secrets:
GITHUB_TOKEN:

Check failure on line 25 in .github/workflows/generate_langs.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/generate_langs.yml

Invalid workflow file

secret name `GITHUB_TOKEN` within `workflow_call` can not be used since it would collide with system reserved name
required: true
jobs:
build-langs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Checkout ViaVersion/Mappings repository
uses: actions/checkout@v7
with:
repository: 'ViaVersion/Mappings'
path: 'Mappings'
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Run Lang Generator Script
env:
MAPPINGS_DIR: ${{ github.workspace }}/Mappings/mappings
MIN_VERSION: ${{ inputs.min_version || github.event.inputs.min_version }}
MAX_VERSION: ${{ inputs.max_version || github.event.inputs.max_version }}
run: python .github/scripts/generate_langs.py
- name: Commit and push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add assets/minecraft/lang/*.json
git diff --staged --quiet || git commit -m "chore: auto-generate translation files"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}