Skip to content

Commit 4698744

Browse files
Upload the Fabric jar from CI too
The staging step only ever walked neoforge/build/libs, so no Fabric jar has reached a workflow artifact since the Fabric subprojects were added. GatewaysToEternity was worse off: it still globbed the root build/libs, which stopped producing a jar at the 2a split, so its upload was failing outright. Both loaders emit the same file name, so the loader now goes into the staged name -- without it the second copy silently overwrites the first and only one loader ships. The artifact zip itself holds both, so its own name drops the loader again. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NddmKFHX4r9dRsTdYysFcz
1 parent 56ed5ed commit 4698744

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,21 @@ jobs:
4646
mkdir -p ci-artifacts
4747
# `-raw` is the shadow plugin's pre-merge jar and `-sources` is not a runnable mod;
4848
# shipping either would just invite someone to install the wrong one.
49-
for jar in neoforge/build/libs/*.jar; do
50-
[ -e "$jar" ] || continue
51-
case "$jar" in *-raw.jar|*-sources.jar) continue ;; esac
52-
base=$(basename "$jar" .jar)
53-
cp "$jar" "ci-artifacts/${base}+${short}.jar"
49+
# Both loaders emit the same file name, so the loader has to go into the staged name --
50+
# without it the second copy silently overwrites the first and only one loader ever ships.
51+
for loader in neoforge fabric; do
52+
for jar in "$loader"/build/libs/*.jar; do
53+
[ -e "$jar" ] || continue
54+
case "$jar" in *-raw.jar|*-sources.jar) continue ;; esac
55+
base=$(basename "$jar" .jar)
56+
cp "$jar" "ci-artifacts/${base}-${loader}+${short}.jar"
57+
done
5458
done
5559
ls -l ci-artifacts
5660
primary=$(find ci-artifacts -name '*.jar' | sort | head -1)
5761
test -n "$primary" || { echo "::error::no jars were produced"; exit 1; }
58-
echo "name=$(basename "$primary" .jar)" >> "$GITHUB_OUTPUT"
62+
# The zip holds both loaders, so its name should not claim one of them.
63+
echo "name=$(basename "$primary" .jar | sed -E 's/-(neoforge|fabric)\+/+/')" >> "$GITHUB_OUTPUT"
5964
6065
- name: Upload jars
6166
uses: actions/upload-artifact@v5

0 commit comments

Comments
 (0)