Add auto PR generation (#48)

* Remap 1.21.6 to Mojang mappings

* start working on automation

* update newVersion script to use manifest

* update scripts

* update doc

* add dispatchable bump workflow

* update workflow env

* update workflows
This commit is contained in:
extremeheat
2025-08-17 23:37:24 +02:00
committed by GitHub
parent f9b358bb07
commit 5a98d2aabd
30 changed files with 553 additions and 353 deletions
+2
View File
@@ -31,6 +31,8 @@ jobs:
versions="${versions%,*}]"
echo "versions=$versions" >> "$GITHUB_OUTPUT"
- name: Ensure that versions.json includes all versions
run: node -e 'const fs = require("fs"); const versions = JSON.parse(fs.readFileSync("versions.json", "utf8")); const expectedVersions = fs.readdirSync("mc"); if (expectedVersions.length !== versions.length || !expectedVersions.every(v => versions.includes(v))) { throw new Error("versions.json does not match the expected versions in mc/ folder"); }'
build:
needs: define-versions
+19
View File
@@ -0,0 +1,19 @@
name: Repo Commands
on:
issue_comment: # Handle comment commands
types: [created]
pull_request_target: # Handle renamed PRs
types: [edited]
jobs:
comment-trigger:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Run command handlers
uses: PrismarineJS/prismarine-repo-actions@master
with:
# NOTE: You must specify a Personal Access Token (PAT) with repo access here. While you can use the default GITHUB_TOKEN, actions taken with it will not trigger other actions, so if you have a CI workflow, commits created by this action will not trigger it.
token: ${{ secrets.PAT_PASSWORD }}
@@ -0,0 +1,15 @@
name: handle-mcdata-update
on:
repository_dispatch:
types: [mc-update]
jobs:
update-mcdata:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: npm install # install gh-helpers
- run: node .github/commands/bump.js ${{ github.event.client_payload.tag }}
env:
GITHUB_TOKEN: ${{ secrets.PAT_PASSWORD }}