File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments