Reusable GitHub Actions workflows for building and releasing Minecraft Bedrock Edition addons.
- Automated Building: Uses local
minecraft-pack-buildscript for consistent builds - Version Management: Automatic version bumping and tagging
- Release Generation: Automated GitHub releases with customizable templates
- Package Integrity: Built-in testing of .mcaddon and .mcpack files
- Flexible Configuration: Support for projects with and without test workflows
Main workflow that handles the complete build and release process.
Inputs:
project_name(required): Name of the project for display purposeshas_test_workflow(optional): Whether the project has a test workflow (default: false)total_blocks(optional): Whether to include total blocks count in statistics (default: false)
Outputs:
version: The incremented version numbertag_name: The tag name for the release
Create .github/templates/release.md in your project with placeholders:
A Minecraft Bedrock Edition addon that adds [description] to your world.
## Files
- BP files: {{ bp_files }}
- RP files: {{ rp_files }}
- Total blocks: {{ total_blocks }}
- Total items: {{ total_items }}
- Total models: {{ total_models }}
- Configured locales: {{ locales_list }}
## Installation
1. Download the `.mcaddon` file from the assets below
2. Open Minecraft Bedrock Edition
3. Go to Settings > Global Resources > My Packs
4. Click "Import" and select the downloaded file
5. Activate the pack in your world
## Features
- Feature 1
- Feature 2
- Feature 3
## Changes
{{ commits }}Create .github/workflows/build.yml in your project:
name: Build & Release Workflow
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build-and-release:
name: Build and release
uses: flower7c3/minecraft-addon-github-workflows/.github/workflows/build-and-release.yml@main
with:
project_name: "Your Project Name"
has_test_workflow: true # Set to false if no test workflow
secrets: inheritYour project must have:
BP/directory withmanifest.jsonRP/directory withmanifest.jsonversion.jsonwith version array (e.g.,{"version": [1, 0, 0]}).github/templates/release.mdtemplate fileminecraft-pack-buildscript (executable)
The following variables are available in your release template:
{{ version }}- Version number (e.g., "1.2.3"){{ bp_files }}- Number of files in BP directory{{ rp_files }}- Number of files in RP directory{{ total_blocks }}- Number of block files (only if total_blocks is true){{ commits }}- List of commits since last tag
jobs:
build-and-release:
name: Build and release
uses: flower7c3/minecraft-addon-github-workflows/.github/workflows/build-and-release.yml@main
with:
project_name: "Polish road signs"
has_test_workflow: true
secrets: inheritjobs:
build-and-release:
name: Build and release
uses: flower7c3/minecraft-addon-github-workflows/.github/workflows/build-and-release.yml@main
with:
project_name: "Simple money"
has_test_workflow: false
secrets: inheritYou can use script for Your local builds. Download it and install locally.
curl -fsSL https://raw.githubusercontent.com/flower7c3/minecraft-addon-workflows/main/minecraft-pack-build -o ~/.local/bin/minecraft-pack-build
chmod +x ~/.local/bin/minecraft-pack-build
minecraft-pack-buildminecraft-pack-build- Local script for building Minecraft addons (included in repository)- actions/checkout - For checking out code
- actions/upload-artifact - For uploading build artifacts
- actions/download-artifact - For downloading artifacts
- softprops/action-gh-release - For creating GitHub releases
This project is licensed under the MIT License – see the LICENSE file for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Test your changes thoroughly
- Submit a pull request
If you encounter any issues or have questions, please open an issue on the GitHub repository.