Remove hardcoded mod.zip dependency; dynamic zip selection and Gradle project root detection#7
Merged
Conversation
…ild in all workflows Agent-Logs-Url: https://github.com/StratCube2/MCmodbuilder-Fabric/sessions/1fdb9b92-74f4-4af0-b8d9-b80ee26df655 Co-authored-by: StratCube2 <176216858+StratCube2@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
StratCube2
April 25, 2026 21:30
View session
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.
Workflows assumed a file named exactly
mod.zipat repo root and a hardcodedmod_extracted/project layout. This replaces all that with runtime discovery of both the zip and the Gradle project root.Changes (applied uniformly across all three workflows)
Trigger
pathsupdated frommod.zip→*.zip+input/*.zipZip selection & extraction
shopt -s nullglobcollects candidates frominput/*.zipthen*.zip; picks first (zips[0])work/directoryGradle project root detection
work/for Gradle files in priority order:settings.gradle→settings.gradle.kts→build.gradle→build.gradle.ktsGITHUB_ENVasPROJECT_ROOTBuild & artifact upload
gradleis on PATH, prints version, thencd "$PROJECT_ROOT" && gradle build --no-daemonmod_extracted/build/libs/*.jar→${{ env.PROJECT_ROOT }}/build/libs/*.jarError handling
All failure modes (no zip, no project root, no
gradlebinary) now emit explicit messages andexit 1underset -euo pipefail.Java version and Gradle version pinning (per-workflow) are unchanged.