https://github.com/bridge-core/build-mc-project
A GitHub action that builds a Minecraft project using Dash
https://github.com/bridge-core/build-mc-project
Last synced: 5 months ago
JSON representation
A GitHub action that builds a Minecraft project using Dash
- Host: GitHub
- URL: https://github.com/bridge-core/build-mc-project
- Owner: bridge-core
- License: mit
- Created: 2022-01-24T13:39:53.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-12T14:08:58.000Z (about 4 years ago)
- Last Synced: 2025-06-10T21:19:05.386Z (about 1 year ago)
- Size: 10.7 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# build-mc-project
A GitHub action that builds a Minecraft project using Dash.
## Usage
1. Create a compiler config that uses the `rewriteForPackaging` plugin instead of `simpleRewrite`:
```json
{
"plugins": [
[
"typeScript",
{
"inlineSourceMap": true
}
],
"entityIdentifierAlias",
"customEntityComponents",
"customItemComponents",
"customBlockComponents",
"customCommands",
"moLang",
[
"rewriteForPackaging",
{
"packName": "myProject",
"format": "mctemplate" // Or "mcaddon"/"mcworld"
}
]
]
}
```
2. Create a file for your release workflow that looks like this:
```yml
name: 'build-project'
on:
release:
types:
- created
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Building project
uses: bridge-core/build-mc-project@main
with:
project-name: MyProject
package-type: mctemplate
compiler-config: .bridge/compiler/build.json
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: MyProject.mctemplate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
3. Upon creating a new GitHub release, bridge. will now automatically build a new version of the project and attach it as a release artifact.