Fix minecraft-data as proper submodule
This commit is contained in:
@@ -1,59 +0,0 @@
|
||||
name: bedrock-ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 14
|
||||
|
||||
steps:
|
||||
- name: Use Node.js 22.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 22.x
|
||||
# Old versions of bedrock use old libssl that Ubuntu no longer ships with; need manual install
|
||||
- name: Install libssl 1.1
|
||||
run: |
|
||||
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
|
||||
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
|
||||
- name: Checkout node-minecraft-data
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: PrismarineJS/node-minecraft-data
|
||||
submodules: recursive
|
||||
path: node-mcdata
|
||||
# Erase the submodule for minecraft-data with a checkout of the current minecraft-data repo
|
||||
- run: rm -rf node-mcdata/minecraft-data
|
||||
- name: Checkout minecraft-data
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: node-mcdata/minecraft-data
|
||||
# Now install local node-minecraft-data. Running "prepare" should gen data and types
|
||||
- name: Install minecraft-data
|
||||
run: |
|
||||
cd node-mcdata
|
||||
npm install
|
||||
npm run prepare
|
||||
npm link
|
||||
- name: Checkout bedrock-protocol
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: PrismarineJS/bedrock-protocol
|
||||
path: bedrock-protocol
|
||||
# I forget the correct install order, do both
|
||||
- name: Install bedrock-protocol
|
||||
run: |
|
||||
cd bedrock-protocol
|
||||
npm install ../node-mcdata
|
||||
npm i
|
||||
npm install ../node-mcdata
|
||||
- name: Running bedrock-protocol tests
|
||||
run: |
|
||||
curl -o node_modules/protodef/src/serializer.js https://raw.githubusercontent.com/extremeheat/node-protodef/refs/heads/dlog/src/serializer.js && curl -o node_modules/protodef/src/compiler.js https://raw.githubusercontent.com/extremeheat/node-protodef/refs/heads/dlog/src/compiler.js
|
||||
npm test
|
||||
working-directory: bedrock-protocol
|
||||
@@ -1,92 +0,0 @@
|
||||
name: Bedrock Version Bump
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
minecraftVersion:
|
||||
description: 'Bedrock Minecraft version (e.g., 1.21.124)'
|
||||
required: true
|
||||
type: string
|
||||
protocolVersion:
|
||||
description: 'Protocol version number (e.g., 860)'
|
||||
required: true
|
||||
type: string
|
||||
createPr:
|
||||
description: 'Create a pull request with the changes'
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
jobs:
|
||||
bump-bedrock-version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.PAT_PASSWORD || secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd tools/js
|
||||
npm install
|
||||
|
||||
- name: Run version bump script
|
||||
run: |
|
||||
cd tools/js
|
||||
npm run version bedrock ${{ github.event.inputs.minecraftVersion }} ${{ github.event.inputs.protocolVersion }}
|
||||
|
||||
- name: Build protocol files
|
||||
run: |
|
||||
cd tools/js
|
||||
npm run build
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd tools/js
|
||||
npm test
|
||||
|
||||
- name: Create Pull Request
|
||||
if: ${{ github.event.inputs.createPr == 'true' }}
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
with:
|
||||
token: ${{ secrets.PAT_PASSWORD || secrets.GITHUB_TOKEN }}
|
||||
commit-message: |
|
||||
Add bedrock ${{ github.event.inputs.minecraftVersion }} protocol data
|
||||
|
||||
Updates:
|
||||
- Protocol version → ${{ github.event.inputs.protocolVersion }}
|
||||
- Minecraft version → ${{ github.event.inputs.minecraftVersion }}
|
||||
- Moved previous proto.yml to versioned folder
|
||||
- Updated protocolVersions.json, versions.json, and dataPaths.json
|
||||
- Regenerated protocol.json files
|
||||
branch: bedrock-bump-${{ github.event.inputs.minecraftVersion }}
|
||||
delete-branch: true
|
||||
title: Add bedrock ${{ github.event.inputs.minecraftVersion }} data
|
||||
body: |
|
||||
## Bedrock Version Bump
|
||||
|
||||
This PR adds support for Minecraft Bedrock Edition version **${{ github.event.inputs.minecraftVersion }}** with protocol version **${{ github.event.inputs.protocolVersion }}**.
|
||||
|
||||
### Changes
|
||||
- ✅ Protocol version bumped to ${{ github.event.inputs.protocolVersion }}
|
||||
- ✅ Minecraft version updated to ${{ github.event.inputs.minecraftVersion }}
|
||||
- ✅ Previous proto.yml files moved to versioned folder
|
||||
- ✅ Updated protocolVersions.json and versions.json
|
||||
- ✅ Regenerated all protocol.json files
|
||||
- ✅ All tests passing
|
||||
|
||||
### How this was generated
|
||||
This PR was automatically generated using the bedrock version bump workflow.
|
||||
|
||||
---
|
||||
🤖 Generated by GitHub Actions workflow
|
||||
labels: |
|
||||
bedrock
|
||||
version-bump
|
||||
automated
|
||||
@@ -1,22 +0,0 @@
|
||||
name: Repository Dispatch
|
||||
on:
|
||||
repository_dispatch:
|
||||
types: [node-mcData-release]
|
||||
jobs:
|
||||
myEvent:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: web
|
||||
- name: Use Node.js 22.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 22.x
|
||||
- name: Run tool
|
||||
run: |
|
||||
npm install
|
||||
git config user.name 'rom1504bot'
|
||||
git config user.email 'rom1504bot@users.noreply.github.com'
|
||||
npm run gh-publish
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [22.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm install
|
||||
working-directory: tools/js
|
||||
- run: npm test
|
||||
working-directory: tools/js
|
||||
@@ -1,22 +0,0 @@
|
||||
name: Repo Commands
|
||||
|
||||
on:
|
||||
issue_comment: # Handle comment commands
|
||||
types: [created]
|
||||
pull_request: # 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 }}
|
||||
# See `Options` section below for more info on these options
|
||||
install-command: cd tools/js && npm install
|
||||
/fixlint.fix-command: cd tools/js && npm run fix
|
||||
@@ -1,39 +0,0 @@
|
||||
name: handle-mcpc-proto_generator
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
versions:
|
||||
description: 'JSON stringified list of known versions in proto_generator (last is expected to be latest)'
|
||||
required: true
|
||||
default: '["1.21.6"]'
|
||||
mergedArtifactURL:
|
||||
description: 'Merged artifact download URL'
|
||||
required: true
|
||||
prNumber:
|
||||
description: 'Relevant minecraft-data-proto_generator PR #'
|
||||
required: false
|
||||
createPr:
|
||||
description: 'Whether to create a new PR if none exists'
|
||||
required: false
|
||||
default: 'false'
|
||||
|
||||
jobs:
|
||||
update-mcdata:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
- run: cd .github/helper-bot && bun install
|
||||
- run: cd tools/js && bun install
|
||||
- run: bun handleMcpcGeneratedArtifacts.js
|
||||
working-directory: .github/helper-bot
|
||||
env:
|
||||
TRIGGER_MC_VERSIONS: ${{ github.event.inputs.versions }}
|
||||
TRIGGER_PR_NO: ${{ github.event.inputs.prNumber }}
|
||||
TRIGGER_ARTIFACT_URL: ${{ github.event.inputs.mergedArtifactURL }}
|
||||
GITHUB_TOKEN: ${{ secrets.PAT_PASSWORD }}
|
||||
CREATE_PR_IF_NONE: ${{ github.event.inputs.createPr }}
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
name: 'tag'
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
tag:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-ecosystem/action-regex-match@v2
|
||||
id: regex-match
|
||||
with:
|
||||
text: ${{ github.event.head_commit.message }}
|
||||
regex: '^Release ([0-9]+\.[0-9]+\.[0-9]+)'
|
||||
- name: Create Release
|
||||
if: steps.regex-match.outputs.match != ''
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ steps.regex-match.outputs.group1 }}
|
||||
release_name: Release ${{ steps.regex-match.outputs.group1 }}
|
||||
body: ${{ steps.regex-match.outputs.group1 }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
- uses: peter-evans/repository-dispatch@v1
|
||||
if: ${{ steps.regex-match.outputs.match != '' }}
|
||||
with:
|
||||
token: ${{ secrets.PAT_PASSWORD }}
|
||||
repository: PrismarineJS/node-minecraft-data
|
||||
event-type: mcData-release
|
||||
client-payload: '{"tag": "${{ steps.regex-match.outputs.group1 }}"}'
|
||||
@@ -1,32 +0,0 @@
|
||||
name: Update Helper
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
createPr:
|
||||
description: 'If provided, force create an update PR. JSON encoded payload {title, versionJson, latestVersionData, latestVersion}'
|
||||
required: false
|
||||
default: ''
|
||||
schedule:
|
||||
- cron: "0 */2 * * *"
|
||||
|
||||
jobs:
|
||||
helper:
|
||||
name: update-checker
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@master
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@master
|
||||
with:
|
||||
node-version: 22.0.0
|
||||
- name: Install Github Actions toolkit
|
||||
run: npm i
|
||||
working-directory: .github/helper-bot
|
||||
# The env vars contain the relevant trigger information, so we don't need to pass it
|
||||
- name: Runs helper
|
||||
run: node index.js
|
||||
working-directory: .github/helper-bot
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PAT_PASSWORD }}
|
||||
FORCE_CREATE_PR: ${{ github.event.inputs.createPr }}
|
||||
Reference in New Issue
Block a user