feat: add reusable resource pack publish workflow - #25
Merged
Conversation
Packs a Minecraft resource pack directory into a reproducible ZIP, uploads it to an S3-compatible store and announces it on Discord. Release and snapshot channels share one implementation. Every upload writes a .sha256 next to the archive plus a latest alias with its own checksum file. A server can then point permanently at the latest URL and read the expected hash beside it: Minecraft re-downloads a pack exactly when the hash it is handed changes, so the URL never has to move per build. The build is reproducible (fixed file order, fixed timestamp, zip -X). Without that the SHA256 would differ on every run and every player would re-download an unchanged pack after every build. s3-endpoint is an input rather than a secret: GitHub masks secret values, so an endpoint passed as a secret renders the download URL as *** in the job summary and the logs. Also documents pr-lint.yml in the catalogue table, which was missing.
A required workflow_call input still arrives as an empty string when the caller feeds it from an unset vars.X, and GitHub accepts that as provided. That produced a malformed download URL and an opaque aws CLI failure instead of a clear error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
resourcepack-publish.yml— the missing piece for publishing Minecraft resource packs.cygnus-packneeds it now;ManisPackhas the identical structure and the same unsolvedproblem, which is why this belongs in the catalogue rather than in one consumer.
What it does
Packs a
pack-dir(defaultpack/) into a ZIP, uploads it to an S3-compatible store, andannounces it on Discord. Two channels off one implementation:
release— immutable versioned archives underreleases/snapshot— rolling builds undersnapshots/, so development can test between releasesToolchain-agnostic: it only turns a directory into a published archive, no build step.
Design notes
.sha256beside every archive, plus alatestalias. This pairing is the whole point.A server points permanently at
<prefix>/<pack>-latest.zipand reads the expected hash fromthe file next to it. Minecraft re-downloads a pack exactly when the hash it is handed changes,
so the URL in the server config never has to move. The alias gets its own checksum file
because
sha256sum -cmatches on the file name recorded inside it.Reproducible ZIP (fixed file order, fixed timestamp,
zip -X). Without it the SHA256differs on every run and every player re-downloads an unchanged pack after every build.
Verified locally: two consecutive builds produce an identical hash.
s3-endpointis an input, not a secret. GitHub masks secret values wherever they appear,so an endpoint passed as a secret renders the download URL as
***in the job summary and inevery log line — the two places anyone actually looks for it. The endpoint is a public
hostname; the keys next to it stay secrets.
JSON validation before packing. A malformed model file otherwise fails silently in the
client: the item renders untextured with nothing in any log to trace it back to.
Context values reach the scripts through
env:only, never interpolated into arunline, soa quote character in any value cannot break the shell.
Verified
pack-dirandpack-name:pack.mcmetalands at the archive root, no wrapper directory,sha256sum -cvalidates, two builds produce an identical hash.README.mdpasses markdownlint. The four pre-existing MD060 findings are unchanged frommain— a newer rule than the CI action currently knows about, untouched here.Also included
pr-lint.ymlwas missing from the catalogue table. Added, since it is the workflow that keepsrelease-please from silently skipping a release under squash merges.
Follow-up
OneLiteFeatherNET/cygnus-pack#1pins@v2.7.0and can only be merged once this is released.