Tick #18399
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'Tick' | |
| on: | |
| schedule: | |
| - cron: '0 * * * *' | |
| workflow_dispatch: | |
| jobs: | |
| check_for_updates: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| id: ${{ steps.check.outputs.id }} | |
| steps: | |
| - id: check | |
| name: Check for Minecraft updates | |
| uses: ByMartrixX/minecraft-update-check-action@v0 | |
| with: | |
| version-manifest-url: 'https://piston-meta.mojang.com/mc/game/version_manifest_v2.json' | |
| cache-base-key: 'mc-manifest-' | |
| update: | |
| runs-on: ubuntu-latest | |
| needs: check_for_updates | |
| if: ${{ needs.check_for_updates.outputs.id != '' }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v5 | |
| - name: Setup Git | |
| uses: fregante/setup-git-user@v2 | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| - name: Install Python dependencies | |
| run: pip install mcgen | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '25' | |
| - name: Purge previous output | |
| run: | | |
| rm -r ./generated | |
| rm -r ./processed | |
| - name: Run mcgen | |
| run: python -m mcgen --rawpath ./temp/raw --outpath ./processed --log INFO --processors mcgen.processors.write_version_file mcgen.processors.convert_json_files mcgen.processors.simplify_blocks mcgen.processors.split_registries custom_processors.summarize_data custom_processors.create_all_tags_data_pack | |
| - name: Cleanup repo | |
| run: | | |
| cp -r ./temp/raw/generated ./generated | |
| cp ./processed/VERSION.txt . | |
| - name: Push tag | |
| run: | | |
| version=$(< VERSION.txt) | |
| git add . | |
| git commit -m $version | |
| git tag -a $version -m $version | |
| git push --follow-tags |