GitHub Actions Publishing
This guide shows you how to automatically publish your Kore-generated datapacks to various platforms using GitHub Actions and the mc-publish action.
Prerequisites
- A GitHub repository containing your Kore project
- Accounts on target platforms (Modrinth, CurseForge, etc.)
- API tokens for each platform you want to publish to
What is mc-publish?
mc-publish is a GitHub Action that simplifies publishing Minecraft projects across multiple platforms including Modrinth, CurseForge, and GitHub Releases. It automatically detects project metadata and handles the complex publication process with minimal configuration.
Setting Up GitHub Secrets
Before configuring your workflow, you'll need to add your platform tokens as GitHub secrets:
- Go to your repository's Settings → Secrets and variables → Actions
- Add the following secrets:
MODRINTH_TOKEN: Your Modrinth API tokenCURSEFORGE_TOKEN: Your CurseForge API tokenGITHUB_TOKENis automatically provided by GitHub
Note: Only add secrets for platforms you plan to publish to.
Basic Workflow Setup
Create .github/workflows/publish.yml in your repository:
Ensure to use datapack.generateZip() in your build script to generate a zip file containing your datapack.
Advanced Configuration
For more control over the publishing process, you can customize various aspects:
Kore-Specific Configuration
Workflow Triggers
You can configure when the publishing workflow runs:
Platform-Specific Features
Modrinth
- Supports featured projects
- Automatic dependency resolution
- Rich markdown changelog support
CurseForge
- Java version specification
- Custom display name support
GitHub Releases
- Draft and prerelease support
- Asset management
This helps mc-publish automatically detect project metadata.
Best Practices
1. Version Management
Use semantic versioning and Git tags:
2. Changelog Management
Maintain a CHANGELOG.md file following Keep a Changelog format:
3. Testing Before Publishing
Add a test job before publishing:
Troubleshooting
Common Issues
- Missing files: Ensure you exported the datapack to the correct directory
- Invalid tokens: Verify your secrets are correctly set in GitHub
- Permission errors: Ensure the workflow has
contents: writepermission
Debugging
Enable debug logging by adding:
Complete Example
Here's a complete workflow for a Kore datapack project:
