Skip to content

Commit 38f3d6c

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents eed5ccc + 460ab28 commit 38f3d6c

662 files changed

Lines changed: 11023 additions & 12327 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.factorypath

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/CODE_OF_CONDUCT.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
# Code of Conduct
22

3-
1. **Before making a claim, try to prove yourself wrong.**
4-
Test it, if feasible. If not, google it to see if someone else has proven it wrong. This saves you from embarrassment and helps to stop the spread of misinformation at the same time.
3+
- Try your best to be respectful and composed. Be constructive with your criticisms, and don't intentionally upset people. When providing negative feedback, attack concepts rather than people. Detailed opinions and reasoning is good, "[project] bad/cursed" is not.
54

6-
2. **Before asking a question, try to answer it for yourself.**
7-
Test it, if feasible. If not, google it to see if someone else has asked it before. This saves you time (it is faster to google something than to wait for a human to reply) and saves us frustration (as a moderator, answering the same question over and over again is tiresome).
5+
- If you're getting heated and your discussions are becoming unproductive, consider stepping away from the conversation until you feel better and can think more clearly.
86

9-
3. **Don't be a jerk.**
10-
We appreciate discussion but do not accept personal attacks and calling people names.
7+
- Remember that everyone has a life as interesting, rich and varied as your own, and these experiences will shape everyone differently. If someone asks you to stop behaving in a certain way, you should listen to them (especially if it directly involves them).
8+
9+
- Don't be afraid to help out if you see someone in need of support. We were all beginners at some point, and everyone benefits from working together on problems.
10+
11+
- All voices are welcome, regardless of age, background, or level of experience. Try to be helpful and encouraging towards newcomers and those that need help, and don't make fun of them for knowing less than you do.
12+
13+
- Avoid being disruptive - don't dump memes or complaints without relevance to the topic at hand, and don't try to interrupt discussions or force them onto another topic.
14+
15+
- Don't ask to ask, just ask! Instead of asking for someone to help, state your problem directly. This makes it more likely for people to engage in conversation and try to help you. See: https://solhsa.com/dontask.html

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Dependabot version updates, see:
2+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: "gradle"
7+
directory: "/"
8+
schedule:
9+
interval: "daily"
10+
time: "06:00"
11+
timezone: "Europe/Berlin"
12+
- package-ecosystem: "github-actions"
13+
# Directory should be `/` instead of `/.github/workflows` according to the docs.
14+
directory: "/"
15+
schedule:
16+
interval: "daily"
17+
time: "06:00"
18+
timezone: "Europe/Berlin"
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# Experimental workflow to automate updating to a new Minecraft snapshot.
2+
3+
# Currently this is very similar to the semi-automatic scripts I already use,
4+
# but moving them to GitHub Actions means I don't have to be around to start
5+
# them. This should allow for further automation in the future.
6+
7+
# TODO:
8+
# - Add more thorough automated testing where it runs the game, creates a test
9+
# world and takes screenshots, similar to what Fabric API does in their
10+
# GitHub Actions workflow.
11+
# - Set up a server to trigger this workflow when a new snapshot is out and
12+
# Fabric has updated to it. This might end up running twice per snapshot,
13+
# because there is no way to know ahead of time if the previous Fabric API
14+
# build still works or if we have to wait for a new build made specifically
15+
# for the new snapshot.
16+
# - Add a step to automatically release the new snapshot build if all tests
17+
# have passed. This will only ever run on small snapshots that don't break
18+
# anything, but should save a ton of time at the end of each snapshot cycle
19+
# when Mojang is spamming tiny pre-releases every day.
20+
21+
# In case it isn't obvious, these todos are very ambitious and might not end
22+
# up working as planned.
23+
24+
name: Auto Snapshot Update
25+
26+
on:
27+
workflow_dispatch:
28+
inputs:
29+
mc_version:
30+
description: "Minecraft version to update to"
31+
required: true
32+
yarn_mappings:
33+
description: "Yarn mappings version"
34+
required: true
35+
fabric_loader:
36+
description: "Fabric Loader version"
37+
required: true
38+
fapi_version:
39+
description: "Fabric API version"
40+
required: true
41+
distinct_id:
42+
description: "Automatically set by the return-dispatch action (leave blank if running manually)"
43+
required: false
44+
45+
permissions:
46+
# To push changes to the new snapshot branch.
47+
contents: write
48+
# To trigger the CI workflow.
49+
actions: write
50+
51+
jobs:
52+
update:
53+
runs-on: ubuntu-latest
54+
steps:
55+
56+
- name: Echo distinct ID ${{ github.event.inputs.distinct_id }}
57+
run: echo ${{ github.event.inputs.distinct_id }}
58+
59+
- name: Checkout repository
60+
uses: actions/checkout@v4
61+
with:
62+
# Include all branches in case the new snapshot branch already exists.
63+
fetch-depth: 0
64+
65+
- name: Set up Python 3.12
66+
uses: actions/setup-python@v5
67+
with:
68+
python-version: "3.12"
69+
70+
- name: Set up Java 21
71+
uses: actions/setup-java@v4
72+
with:
73+
java-version: "21"
74+
distribution: "microsoft"
75+
76+
- name: Grant execute permission for gradlew
77+
run: chmod +x gradlew
78+
79+
- name: Setup Gradle
80+
uses: gradle/actions/setup-gradle@v4
81+
with:
82+
build-scan-publish: true
83+
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
84+
build-scan-terms-of-use-agree: "yes"
85+
86+
- name: Create and checkout new snapshot branch
87+
run: |
88+
BRANCH_NAME="${{ github.event.inputs.mc_version }}"
89+
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
90+
91+
if [ "$CURRENT_BRANCH" = "$BRANCH_NAME" ]; then
92+
echo "Already on branch $BRANCH_NAME. Skipping branch creation."
93+
elif git show-ref --quiet refs/heads/$BRANCH_NAME; then
94+
echo "Branch $BRANCH_NAME already exists but is not currently checked out. Failing the workflow."
95+
exit 1
96+
else
97+
git checkout -b $BRANCH_NAME
98+
echo "Created and checked out new branch: $BRANCH_NAME"
99+
fi
100+
101+
- name: Run migrateMappings task
102+
run: |
103+
./gradlew migrateMappings --mappings ${{ github.event.inputs.yarn_mappings }}
104+
105+
- name: Replace src/main/java with remapped files
106+
run: |
107+
rm -rf ./src/main/java
108+
mv ./remappedSrc ./src/main/java
109+
110+
- name: Update version constants
111+
run: |
112+
python scripts/update_version_constants.py \
113+
"${{ github.event.inputs.mc_version }}" \
114+
"${{ github.event.inputs.yarn_mappings }}" \
115+
"${{ github.event.inputs.fabric_loader }}" \
116+
"${{ github.event.inputs.fapi_version }}"
117+
118+
# To fix any style issues that the migration scripts might cause
119+
- name: Run spotlessApply task
120+
run: ./gradlew spotlessApply
121+
122+
- name: Commit and push changes
123+
run: |
124+
git config --global user.name "Wurst-Bot"
125+
git config --global user.email "[email protected]"
126+
git add .
127+
git commit -m "[Wurst-Bot] Update to ${{ github.event.inputs.mc_version }}"
128+
git push --set-upstream origin ${{ github.event.inputs.mc_version }}
129+
130+
- name: Trigger CI on the new branch
131+
id: ci_dispatch
132+
uses: codex-/return-dispatch@v2
133+
with:
134+
token: ${{ github.token }}
135+
owner: Wurst-Imperium
136+
repo: Wurst7
137+
ref: ${{ github.event.inputs.mc_version }}
138+
workflow: gradle.yml
139+
140+
- name: Wait for CI to finish (run ${{ steps.ci_dispatch.outputs.run_id }})
141+
uses: codex-/await-remote-run@v1
142+
with:
143+
token: ${{ github.token }}
144+
owner: Wurst-Imperium
145+
repo: Wurst7
146+
run_id: ${{ steps.ci_dispatch.outputs.run_id }}
147+
run_timeout_seconds: 600 # 10 minutes
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Check Translations
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- "dependabot/**"
7+
tags-ignore:
8+
- "**"
9+
paths:
10+
- "src/main/resources/assets/wurst/translations/**.json"
11+
- "src/main/resources/intentionally_untranslated.json"
12+
pull_request:
13+
paths:
14+
- "src/main/resources/assets/wurst/translations/**.json"
15+
- "src/main/resources/intentionally_untranslated.json"
16+
workflow_dispatch:
17+
18+
jobs:
19+
check_translations:
20+
runs-on: ubuntu-latest
21+
steps:
22+
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Set up Python 3.12
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: "3.12"
30+
31+
- name: Run check_translations.py
32+
run: python scripts/check_translations.py
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Update Gradle Dependency Graph
2+
3+
on:
4+
push:
5+
branches:
6+
# Submitting dependency graph reports on non-default branches does nothing
7+
- "master"
8+
tags-ignore:
9+
- "**"
10+
paths:
11+
- "gradle**"
12+
- "*.gradle"
13+
workflow_dispatch:
14+
15+
permissions:
16+
# Needed by the dependency-submission action.
17+
contents: write
18+
19+
jobs:
20+
dependency_graph:
21+
runs-on: ubuntu-latest
22+
steps:
23+
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
27+
- name: Set up Java 21
28+
uses: actions/setup-java@v4
29+
with:
30+
java-version: "21"
31+
distribution: "microsoft"
32+
33+
- name: Grant execute permission for gradlew
34+
run: chmod +x gradlew
35+
36+
- name: Generate and submit dependency graph
37+
uses: gradle/actions/dependency-submission@v4
38+
with:
39+
build-scan-publish: true
40+
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
41+
build-scan-terms-of-use-agree: "yes"

0 commit comments

Comments
 (0)