Skip to content

Add automated publish workflow for Modrinth and CurseForge - #26

Merged
dsnsgithub merged 2 commits into
mainfrom
claude/betterhud-release-automation-rpypcc
Jul 8, 2026
Merged

Add automated publish workflow for Modrinth and CurseForge#26
dsnsgithub merged 2 commits into
mainfrom
claude/betterhud-release-automation-rpypcc

Conversation

@dsnsgithub

Copy link
Copy Markdown
Owner

Summary

This PR adds a new GitHub Actions workflow that automates publishing BetterHUD to both Modrinth and CurseForge platforms. Previously, releases required manual uploads; now they can be published on-demand through the Actions tab with a single workflow dispatch.

Key Changes

  • New publish workflow (.github/workflows/publish.yml): Automated release pipeline that:

    • Builds all Stonecutter variants
    • Uploads each release jar as a separate version to Modrinth and/or CurseForge
    • Automatically selects the correct Minecraft versions for each jar based on supported-versions.json
    • Supports configurable changelog, release channel (release/beta/alpha), and target platforms
    • Enforces sequential uploads with concurrency controls to prevent interleaving
    • Validates required API tokens before attempting publication
  • Enhanced matrix generation script (.github/scripts/generate-matrices.sh): Extended to compute a new publish matrix that includes:

    • game_versions: Newline-separated list of Minecraft versions each variant supports
    • range: Human-readable version range for release names (e.g., "1.21-1.21.5")
  • Updated documentation (README.md): Revised release instructions to reflect the new automated workflow, including:

    • Steps to trigger the publish workflow from the Actions tab
    • Required repository secrets (Modrinth PAT and CurseForge API token)
    • Fallback instructions for manual uploads via ./gradlew modrinthBundle

Implementation Details

  • The workflow uses mc-publish action to handle platform-specific uploads
  • Token validation occurs early to fail fast if required secrets are missing
  • Builds are performed sequentially (max-parallel: 1) to ensure oldest Minecraft versions are uploaded first, with the newest version ending up as the most recent upload
  • The workflow only builds; correctness validation is delegated to existing launch tests in build.yml

https://claude.ai/code/session_01Gw2SqwSvrHSQcDDXSH2Vn9

Run the "publish" workflow from the Actions tab to release the current
mod_version: it builds every Stonecutter variant and uploads each release
jar as its own version on Modrinth (betterhudfabric) and CurseForge
(project 1375095) via mc-publish, selecting exactly the Minecraft
versions each jar covers from supported-versions.json.

- generate-matrices.sh gains a `publish` matrix (variant, java, per-jar
  game version list, and a human-readable range for the release name)
- inputs: changelog, release channel (release/beta/alpha), and platform
  selection (both/modrinth/curseforge)
- uploads run one variant at a time, oldest first, so the newest
  Minecraft build ends up as the most recent upload; a failure stops
  the remaining uploads
- fails fast if a selected platform's token secret (MODRINTH_TOKEN /
  CURSEFORGE_TOKEN) is missing, since mc-publish would otherwise skip
  it silently
- README release section updated accordingly

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gw2SqwSvrHSQcDDXSH2Vn9
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Client launch test

The game launched and entered a survival singleplayer world with the HUD active, on every supported Minecraft version, for b0cd191. A ❌ means that version's launch test did not produce a screenshot — check its job. Title-screen screenshots and game logs are in the run artifacts.

1.21
BetterHUD on Minecraft 1.21
1.21.1
BetterHUD on Minecraft 1.21.1
1.21.2
BetterHUD on Minecraft 1.21.2
1.21.3
BetterHUD on Minecraft 1.21.3
1.21.4
BetterHUD on Minecraft 1.21.4
1.21.5
BetterHUD on Minecraft 1.21.5
1.21.6
BetterHUD on Minecraft 1.21.6
1.21.7
BetterHUD on Minecraft 1.21.7
1.21.8
BetterHUD on Minecraft 1.21.8
1.21.9
BetterHUD on Minecraft 1.21.9
1.21.10
BetterHUD on Minecraft 1.21.10
1.21.11
BetterHUD on Minecraft 1.21.11
26.1
BetterHUD on Minecraft 26.1
26.1.1
BetterHUD on Minecraft 26.1.1
26.1.2
BetterHUD on Minecraft 26.1.2
26.2
BetterHUD on Minecraft 26.2

Titles now read e.g. "BetterHUD 2.1.1 (Minecraft 1.21-1.21.5)", matching
the convention of the existing uploads on Modrinth and CurseForge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gw2SqwSvrHSQcDDXSH2Vn9
@dsnsgithub
dsnsgithub merged commit 24963d6 into main Jul 8, 2026
23 checks passed
dsnsgithub added a commit that referenced this pull request Jul 8, 2026
* Update Minecraft dependency version range (#24)

* Update requirements formatting in README.md

* Add automated publish workflow for Modrinth and CurseForge (#26)

* Add on-demand publish workflow for Modrinth and CurseForge

Run the "publish" workflow from the Actions tab to release the current
mod_version: it builds every Stonecutter variant and uploads each release
jar as its own version on Modrinth (betterhudfabric) and CurseForge
(project 1375095) via mc-publish, selecting exactly the Minecraft
versions each jar covers from supported-versions.json.

- generate-matrices.sh gains a `publish` matrix (variant, java, per-jar
  game version list, and a human-readable range for the release name)
- inputs: changelog, release channel (release/beta/alpha), and platform
  selection (both/modrinth/curseforge)
- uploads run one variant at a time, oldest first, so the newest
  Minecraft build ends up as the most recent upload; a failure stops
  the remaining uploads
- fails fast if a selected platform's token secret (MODRINTH_TOKEN /
  CURSEFORGE_TOKEN) is missing, since mc-publish would otherwise skip
  it silently
- README release section updated accordingly

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gw2SqwSvrHSQcDDXSH2Vn9

* Match existing release title format ("Minecraft" in the range)

Titles now read e.g. "BetterHUD 2.1.1 (Minecraft 1.21-1.21.5)", matching
the convention of the existing uploads on Modrinth and CurseForge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gw2SqwSvrHSQcDDXSH2Vn9

---------

Co-authored-by: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
@dsnsgithub
dsnsgithub deleted the claude/betterhud-release-automation-rpypcc branch July 8, 2026 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants