This repository was archived by the owner on Jul 28, 2026. It is now read-only.
Update and Generate Bundles #1870
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: "Update and Generate Bundles" | |
| on: | |
| schedule: | |
| - cron: "0 * * * *" | |
| push: | |
| paths: | |
| - oneclient/** | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| UpdateAndGenerateBundles: | |
| name: Update and Generate Bundles | |
| runs-on: ubuntu-latest | |
| if: >- | |
| github.event_name == 'workflow_dispatch' || | |
| github.event_name == 'schedule' || | |
| (github.event_name == 'push' && | |
| github.ref_name == 'main' && | |
| github.repository_id == '438157081') | |
| steps: | |
| - name: Git checkout | |
| uses: actions/checkout@v4 | |
| - name: Allow running the scripts | |
| run: | | |
| chmod +x ./oneclient/update-bundles.sh | |
| chmod +x ./oneclient/generate-bundles.sh | |
| - name: Update Bundles | |
| run: ./oneclient/update-bundles.sh | |
| # Gate: if the freshly-updated versions break the dependency graph, fail here | |
| # instead of generating + committing a broken pack. | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "pnpm" | |
| - name: Install node dependencies | |
| run: pnpm i | |
| - name: Cache mod jars | |
| uses: actions/cache@v4 | |
| with: | |
| path: oneclient/.cache/jars | |
| key: mod-jars-${{ hashFiles('oneclient/mrpacks/**/*.pw.toml') }} | |
| restore-keys: | | |
| mod-jars- | |
| - name: Check compatibility | |
| run: pnpm check:compat | |
| - name: Generate Bundles | |
| run: ./oneclient/generate-bundles.sh | |
| - name: Commit and push the updated and generated bundles | |
| run: | | |
| git config --global user.name "Bundle Updater[bot]" | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add . | |
| git commit -m "chore(update-generate-bundles)" || echo "No changes to commit" | |
| git push origin "${GITHUB_REF_NAME:-main}" |