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:
@@ -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
|
||||
|
||||
@@ -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 }}
|
||||
Reference in New Issue
Block a user