Skip to content

Commit 8f9cbb3

Browse files
committed
Why did I do this
1 parent 9b1223a commit 8f9cbb3

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

.github/workflows/build-and-release.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,8 @@ jobs:
3737
id: build
3838
run: |
3939
./gradlew build
40-
# Read mod id and version from gradle.properties to match Gradle's jar naming
41-
MOD_ID=$(grep "^mod_id=" gradle.properties | cut -d'=' -f2)
42-
MOD_VER=$(grep "^mod_version=" gradle.properties | cut -d'=' -f2)
43-
# Prefer the canonical Gradle artifact name: ${MOD_ID}-${MOD_VER}*.jar
44-
JAR_FILE=$(ls build/libs/"${MOD_ID}-${MOD_VER}"*.jar 2>/dev/null | grep -v sources | head -1 || true)
45-
# Fallback: pick the first non-sources jar
46-
if [ -z "$JAR_FILE" ]; then
47-
JAR_FILE=$(ls build/libs/*.jar | grep -v sources | head -1 || true)
48-
fi
49-
echo "filename=$(basename "$JAR_FILE")" >> $GITHUB_OUTPUT
40+
JAR_FILE=$(ls build/libs/*.jar | grep -v sources | head -1)
41+
echo "filename=$(basename $JAR_FILE)" >> $GITHUB_OUTPUT
5042
5143
- name: Get version from gradle.properties
5244
id: version

0 commit comments

Comments
 (0)