Skip to content

Loader: Intro, fabric.mod.json, Dependency Overrides #742

Loader: Intro, fabric.mod.json, Dependency Overrides

Loader: Intro, fabric.mod.json, Dependency Overrides #742

Workflow file for this run

name: Build
on:
pull_request:
types: [opened, ready_for_review, synchronize]
push:
branches: [main]
workflow_dispatch:
concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
docs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- uses: pnpm/action-setup@58e6119fe4f3092a76a7771efb55e04d25b6b26f
with:
run_install: true
- run: pnpm build
- if: github.event_name != 'pull_request'
uses: actions/configure-pages@v4
- if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v3
with:
path: ./.vitepress/dist
mod:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 25
- run: ./gradlew build --stacktrace --warning-mode fail
working-directory: ./reference
- run: ./gradlew runDatagen --stacktrace --warning-mode fail
working-directory: ./reference
- if: failure()
uses: FabricMCBot/publish-checkstyle-report@4627c82002aa370b6cb2a3140f34c7a8c55a5297
with:
reports: reference/**/build/reports/checkstyle/*.xml
# require clean working directory
- run: |
readarray -d '' files < <(git ls-files --modified --others --exclude-standard -z)
[[ ${#files[@]} -eq 0 ]] && exit 0
for f in "${files[@]}"; do
echo "::error file=${f},title=Datagen::Regenerate this file with 'cd reference && ./gradlew runDatagen'"
done
exit 1
# :::automatic-testing:game-test:3
client_game_test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 25
- run: ./gradlew runProductionClientGameTest
# :::automatic-testing:game-test:3
working-directory: ./reference
# :::automatic-testing:game-test:3
- if: always()
uses: actions/upload-artifact@v4
with:
path: build/run/clientGameTest/screenshots
# :::automatic-testing:game-test:3
- if: always()
uses: actions/upload-artifact@v4
with:
path: reference/build/run/clientGameTest/screenshots
deploy:
runs-on: ubuntu-24.04
if: github.event_name != 'pull_request'
needs:
- docs
- mod
- client_game_test
permissions:
pages: write
id-token: write
steps:
- id: deployment
uses: actions/deploy-pages@v4
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}