Commit f996a1c3 by Jonathan Thomas

Attempting to build multiple versions of Minecraft and Fabric API support at the same time

parent 602a402d
Pipeline #12118 failed
......@@ -9,25 +9,37 @@ cache:
stages:
- build
build_mod:
.build_template: &build_definition
stage: build
script:
- echo "Building for Minecraft Version $minecraft_version with Fabric $fabric_version"
- sed -i "s/minecraft_version=.*/minecraft_version=$minecraft_version/" gradle.properties
- sed -i "s/yarn_mappings=.*/yarn_mappings=$yarn_mappings/" gradle.properties
- sed -i "s/loader_version=.*/loader_version=$loader_version/" gradle.properties
- sed -i "s/fabric_version=.*/fabric_version=$fabric_version/" gradle.properties
- ./gradlew build
- find build/libs -type f -name '*sources*.jar' -exec rm {} \;
- mv build/libs/creaturechat-*.jar .
- export FABRIC_VERSION=$(grep 'fabric_version' gradle.properties | cut -d'=' -f2)
- export FABRIC_API_JAR="fabric-api-${FABRIC_VERSION}.jar"
- export FABRIC_API_JAR="fabric-api-${fabric_version}.jar"
- echo Detected Fabric API version from gradle.properties $FABRIC_API_JAR
- export DOWNLOAD_URL="https://github.com/FabricMC/fabric/releases/download/${FABRIC_VERSION//+/%2B}/${FABRIC_API_JAR}"
- export DOWNLOAD_URL="https://github.com/FabricMC/fabric/releases/download/${fabric_version//+/%2B}/${FABRIC_API_JAR}"
- echo Download Fabric API from $DOWNLOAD_URL
- wget -q -O "${FABRIC_API_JAR}" $DOWNLOAD_URL
- ls . -la
artifacts:
paths:
- creaturechat-*.jar
- fabric-api-*.jar
only:
- develop
- multi-version-build-pipeline
tags:
- minecraft
build_mod:
extends: .build_template
parallel:
matrix:
- minecraft_version: ["1.20", "1.20.1", "1.20.2", "1.20.3", "1.20.4", "1.20.5", "1.20.6"]
yarn_mappings: ["1.20+build.1", "1.20.1+build.10", "1.20.2+build.4", "1.20.3+build.1", "1.20.4+build.3", "1.20.5+build.1", "1.20.6+build.1"]
loader_version: ["0.15.11", "0.15.11", "0.15.11", "0.15.11", "0.15.11", "0.15.11", "0.15.11"]
fabric_version: ["0.83.0+1.20", "0.92.1+1.20.1", "0.91.6+1.20.2", "0.91.1+1.20.3", "0.97.0+1.20.4", "0.97.8+1.20.5", "0.97.8+1.20.6"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment