Skip to content

Fixed

Fixed #17

Workflow file for this run

name: CI
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Replace version
run: |
sed -i "s/_VERSION_/$(git rev-parse --short "$GITHUB_SHA")/g" pack.toml
echo "VERSION=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
sed -i "s/_VERSION_/0.0.0/g" config/fabric_loader_dependencies.json
find config -type f -exec sed -i "s/_VERSION_/$(git rev-parse --short "$GITHUB_SHA")/g" {} +
find config -type f -exec sed -i "s/_COMMIT_/${{ github.sha }}/g" {} +
- name: Install Packwiz
run: |
sudo curl -L https://github.com/REVanillaW/packwiz/releases/download/CI/packwiz-linux-amd64 -o /bin/packwiz
sudo chmod +x /bin/packwiz
packwiz refresh --build
- name: Export Modrinth modpack
run: |
packwiz rehash sha256
packwiz modrinth export
- name: Upload Modrinth modpack
uses: actions/upload-artifact@v4
with:
name: Modrinth
path: Extremely Optimised-${{ env.VERSION }}.mrpack
if-no-files-found: error
- name: Export CurseForge modpack
run: |
packwiz rehash sha1
packwiz curseforge export
- name: Upload CurseForge modpack
uses: actions/upload-artifact@v4
with:
name: CurseForge
path: Extremely Optimised-${{ env.VERSION }}.zip
if-no-files-found: error
- name: Update mods
run: |
packwiz update --all -y | tee UPDATE_LOG
if [ `grep -c "All files are up to date!" UPDATE_LOG` -ne "1" ]; then echo "::warning title=Update Available::Some mods can be updated."; fi
run:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: Modrinth
- name: Install Console Minecraft Launcher
run: curl -L https://github.com/MrShieh-X/console-minecraft-launcher/releases/download/2.2.1/cmcl.jar -o cmcl.jar
- name: Set up Java 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'zulu'
- name: Install modpack
run: |
mv *.mrpack CI.mrpack
java -jar cmcl.jar config downloadSource 0
java -jar cmcl.jar modpack --file="CI.mrpack" --storage=CI --no-assets
- name: Run Minecraft
run: |
java -jar cmcl.jar account --login=offline --name=PlusVanilla
java -jar cmcl.jar config exitWithMinecraft true
java -jar cmcl.jar config printStartupInfo true
java -jar cmcl.jar config checkAccountBeforeStart false
echo "0" | java -jar cmcl.jar CI
if [ `grep -c "java.lang.IllegalStateException: Failed to initialize GLFW, errors: GLFW error during init: [0x1000E]Failed to detect any supported platform" .minecraft/versions/CI/logs/latest.log` -ne "1" ]; then echo "::error title=Game crashed::Oops." && exit 1; fi