Skip to content

Commit 362ce5d

Browse files
Update GHA workflows
1 parent 73ed982 commit 362ce5d

File tree

6 files changed

+43
-62
lines changed

6 files changed

+43
-62
lines changed

.github/workflows/auto_snapshot_update.yml

Lines changed: 17 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,4 @@
11
# 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-
242
name: Auto Snapshot Update
253

264
on:
@@ -53,8 +31,8 @@ jobs:
5331
runs-on: ubuntu-latest
5432
steps:
5533

56-
- name: Echo distinct ID ${{ github.event.inputs.distinct_id }}
57-
run: echo ${{ github.event.inputs.distinct_id }}
34+
- name: Echo distinct ID ${{ inputs.distinct_id }}
35+
run: echo ${{ inputs.distinct_id }}
5836

5937
- name: Checkout repository
6038
uses: actions/checkout@v5
@@ -80,22 +58,25 @@ jobs:
8058
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
8159
build-scan-terms-of-use-agree: "yes"
8260

83-
- name: Run migrateMappings task
61+
- name: Migrate mappings for main source set
8462
run: |
85-
./gradlew migrateMappings --mappings ${{ github.event.inputs.yarn_mappings }}
63+
./gradlew migrateMappings --mappings ${{ inputs.yarn_mappings }} --input "src/main/java" --output "src/main/java_"
64+
rm -rf ./src/main/java
65+
mv ./src/main/java_ ./src/main/java
8666
87-
- name: Replace src/main/java with remapped files
67+
- name: Migrate mappings for test source set
8868
run: |
89-
rm -rf ./src/main/java
90-
mv ./remappedSrc ./src/main/java
69+
./gradlew migrateMappings --mappings ${{ inputs.yarn_mappings }} --input "src/test/java" --output "src/test/java_"
70+
rm -rf ./src/test/java
71+
mv ./src/test/java_ ./src/test/java
9172
9273
- name: Update version constants
9374
run: |
9475
python scripts/update_version_constants.py \
95-
"${{ github.event.inputs.mc_version }}" \
96-
"${{ github.event.inputs.yarn_mappings }}" \
97-
"${{ github.event.inputs.fabric_loader }}" \
98-
"${{ github.event.inputs.fapi_version }}"
76+
"${{ inputs.mc_version }}" \
77+
"${{ inputs.yarn_mappings }}" \
78+
"${{ inputs.fabric_loader }}" \
79+
"${{ inputs.fapi_version }}"
9980
10081
# To fix any style issues that the migration scripts might cause
10182
- name: Run spotlessApply task
@@ -106,7 +87,7 @@ jobs:
10687
git config --global user.name "Wurst-Bot"
10788
git config --global user.email "[email protected]"
10889
git add .
109-
git commit -m "[Wurst-Bot] Update to ${{ github.event.inputs.mc_version }}"
90+
git commit -m "[Wurst-Bot] Update to ${{ inputs.mc_version }}"
11091
git push
11192
11293
- name: Trigger CI
@@ -115,7 +96,7 @@ jobs:
11596
with:
11697
token: ${{ github.token }}
11798
owner: Wurst-Imperium
118-
repo: Wurst7
99+
repo: ${{ github.event.repository.name }}
119100
ref: ${{ github.ref }}
120101
workflow: gradle.yml
121102

@@ -124,6 +105,6 @@ jobs:
124105
with:
125106
token: ${{ github.token }}
126107
owner: Wurst-Imperium
127-
repo: Wurst7
108+
repo: ${{ github.event.repository.name }}
128109
run_id: ${{ steps.ci_dispatch.outputs.run_id }}
129110
run_timeout_seconds: 600 # 10 minutes

.github/workflows/dependency_graph.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ name: Update Gradle Dependency Graph
33
on:
44
push:
55
branches:
6-
# Submitting dependency graph reports on non-default branches does nothing
7-
- "master"
6+
# Submitting dependency graph reports on non-default branches does nothing
7+
- "master"
88
tags-ignore:
9-
- "**"
9+
- "**"
1010
paths:
11-
- "gradle**"
12-
- "*.gradle"
11+
- "gradle**"
12+
- "*.gradle"
1313
workflow_dispatch:
1414

1515
permissions:

.github/workflows/gradle.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@ name: Java CI with Gradle
33
on:
44
push:
55
branches-ignore:
6-
- "dependabot/**"
6+
- "dependabot/**"
77
tags-ignore:
8-
- "**"
8+
- "**"
99
paths:
10-
- "**.java"
11-
- "**.json"
12-
- "**.yml"
13-
- "gradle**"
14-
- "*.gradle"
15-
- "*.accesswidener"
10+
- "**.java"
11+
- "**.json"
12+
- "**.yml"
13+
- "gradle**"
14+
- "*.gradle"
15+
- "*.accesswidener"
1616
pull_request:
1717
paths:
18-
- "**.java"
19-
- "**.json"
20-
- "**.yml"
21-
- "gradle**"
22-
- "*.gradle"
23-
- "*.accesswidener"
18+
- "**.java"
19+
- "**.json"
20+
- "**.yml"
21+
- "gradle**"
22+
- "*.gradle"
23+
- "*.accesswidener"
2424
workflow_dispatch:
2525
inputs:
2626
distinct_id:
@@ -35,8 +35,8 @@ jobs:
3535
IMGUR_CLIENT_ID: ${{ secrets.IMGUR_CLIENT_ID }}
3636
steps:
3737

38-
- name: Echo distinct ID ${{ github.event.inputs.distinct_id }}
39-
run: echo ${{ github.event.inputs.distinct_id }}
38+
- name: Echo distinct ID ${{ inputs.distinct_id }}
39+
run: echo ${{ inputs.distinct_id }}
4040

4141
- name: Checkout repository
4242
uses: actions/checkout@v5

.github/workflows/multi_publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Publish Multiple Releases
2-
run-name: Publish v${{ github.event.inputs.wurst_version }} build(s) from ${{ github.event.inputs.branches }}
2+
run-name: Publish v${{ inputs.wurst_version }} build(s) from ${{ inputs.branches }}
33

44
on:
55
workflow_dispatch:
@@ -95,7 +95,7 @@ jobs:
9595
owner: Wurst-Imperium
9696
repo: Wurst7
9797
run_id: ${{ steps.publish_dispatch.outputs.run_id }}
98-
run_timeout_seconds: 600 # 10 minutes
98+
run_timeout_seconds: 1800 # 30 minutes
9999

100100
announce_update:
101101
runs-on: ubuntu-latest

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ jobs:
4242
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4343
steps:
4444

45-
- name: Echo distinct ID ${{ github.event.inputs.distinct_id }}
46-
run: echo ${{ github.event.inputs.distinct_id }}
45+
- name: Echo distinct ID ${{ inputs.distinct_id }}
46+
run: echo ${{ inputs.distinct_id }}
4747

4848
- name: Checkout repository
4949
uses: actions/checkout@v5

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Close stale issues and pull requests
22

33
on:
44
schedule:
5-
- cron: "30 1 * * 1-5"
5+
- cron: "30 1 * * 1-5"
66

77
permissions:
88
# Both needed by the stale action.

0 commit comments

Comments
 (0)