Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.git* @FabricMC/developers
.nvmrc @FabricMC/developers
crowdin.yml @FabricMC/developers
crowdin.yaml @FabricMC/developers
netlify.toml @FabricMC/developers
package.json @FabricMC/developers
package-lock.json @FabricMC/developers
89 changes: 89 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Build

on:
pull_request:
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
- run: npm ci
- run: npm run 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: 21
- 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: |
if [ -n "$(git status --porcelain)" ]; then
git status
exit 1
fi

# :::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: 21
- 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

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 }}
64 changes: 0 additions & 64 deletions .github/workflows/build.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Format

on:
pull_request:
paths-ignore:
- .vitepress/sidebars/versioned/**
- reference/*.*/**
- reference/latest/src/main/generated/**
- translated/**
- versions/**
workflow_dispatch:

concurrency:
group: format-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
markdownlint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: npm ci
- uses: FabricMCBot/markdownlint-cli2-action@b4c9feab76d8025d1e83c653fa3990936df0e6c8
with:
config: .markdownlint-cli2.yaml
globs: |
**/*.md
!.git/**
!node_modules/**
!README.md
!translated/**
!versions/**

prettier:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: npm ci
- run: npx prettier --list-different .
83 changes: 83 additions & 0 deletions .github/workflows/l10n-pull.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# This workflow is based on work originally published under the MIT License, and available here:
# <https://github.com/modrinth/code/blob/7de4e55badd38aa969fb7181f5889e9f03ab757b/.github/workflows/i18n-pull.yml>
# The required copyright notice and the full text of the license, which apply to the original file, are reported below.

# Copyright 2025 Rinth, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

name: Pull from Crowdin

on:
schedule:
- cron: 37 7 * * SAT
workflow_dispatch:

concurrency:
group: l10n-pull

permissions:
contents: write
pull-requests: write

jobs:
l10n-pull:
runs-on: ubuntu-24.04
steps:
- if: startsWith(github.ref_name, 'l10n/')
run: exit 1
- uses: actions/checkout@v4
- uses: crowdin/github-action@60debf382ee245b21794321190ad0501db89d8c1
with:
token: ${{ secrets.CROWDIN_TOKEN }}
crowdin_branch_name: ${{ github.ref_name }}
upload_sources: false
upload_translations: false
download_sources: false
download_translations: true
create_pull_request: false
push_translations: false
- run: sudo chown -R "${USER}:${USER}" .
- run: git fetch --depth=1 origin "l10n/${{ github.ref_name }}" || true
- id: check-patch
run: |
# this check is to avoid force-pushing a new commit if the only
# difference between it and the situation at 'origin' is a rebase
git diff --quiet --no-index \
<(git show --pretty=format: "origin/l10n/${{ github.ref_name }}") \
<(git diff)
echo needs_push="$?" >>"${GITHUB_OUTPUT}"
- id: message
run: |
prefix="l10n: $(date +"%y")w$(date +"%W")"

old_message="$(git show --no-patch --pretty=format:%s "l10n/${{ github.ref_name }}" || true)"
regex="^${prefix}([a-z]+)"
if [[ "${old_message}" =~ ${regex} ]]; then
old_suffix="${BASH_REMATCH[1]}"
if [[ "${old_suffix}" =~ z$ ]]; then
suffix="${old_suffix%?}oa"
else
last_char="$(tr "a-y" "b-z" <<<"${old_suffix: -1}")"
suffix="${old_suffix%?}${last_char}"
fi
else
suffix="a"
fi

echo message="${prefix}${suffix}" >>"${GITHUB_OUTPUT}"
- if: steps.check-patch.outputs.needs_push
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725
with:
title: ${{ steps.message.outputs.message }}
body: ""
commit-message: ${{ steps.message.outputs.message }}
branch: l10n/${{ github.ref_name }}
author: Fabric Bot <159731069+FabricMCBot@users.noreply.github.com>
committer: Fabric Bot <159731069+FabricMCBot@users.noreply.github.com>
labels: i18n-l10n
maintainer-can-modify: false
49 changes: 49 additions & 0 deletions .github/workflows/l10n-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This workflow is based on work originally published under the MIT License, and available here:
# <https://github.com/modrinth/code/blob/7de4e55badd38aa969fb7181f5889e9f03ab757b/.github/workflows/i18n-push.yml>
# The required copyright notice and the full text of the license are reported below.

# Copyright 2025 Rinth, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

name: Push to Crowdin

on:
push:
branches: [main]
paths:
- ".github/workflows/l10n-push.yaml"
- "**.md"
- "*_translations.json"
- "crowdin.yaml"
- "!README.md"
- "!translated/**"
- "!versions/**"
workflow_dispatch:

concurrency:
group: l10n-push

jobs:
l10n-push:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.crowdin/cache.json
key: ${{ runner.os }}-crowdin-cache-${{ github.ref_name }}-${{ hashFiles('**/crowdin.yaml') }}
restore-keys: ${{ runner.os }}-crowdin-cache-${{ github.ref_name }}-
- uses: crowdin/github-action@60debf382ee245b21794321190ad0501db89d8c1
with:
token: ${{ secrets.CROWDIN_TOKEN }}
crowdin_branch_name: ${{ github.ref_name }}
upload_sources_args: --cache
upload_sources: true
upload_translations: false
download_sources: false
download_translations: false
41 changes: 0 additions & 41 deletions .github/workflows/markdownlint.yml

This file was deleted.

Loading
Loading