Skip to content

Commit d985234

Browse files
authored
Update v2.8.0 (#420)
1 parent a3c95d7 commit d985234

File tree

779 files changed

+34295
-33473
lines changed

Some content is hidden

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

779 files changed

+34295
-33473
lines changed

.github/actions/build_setup/action.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,19 @@ runs:
1111
using: 'composite'
1212

1313
steps:
14-
- name: Setup Python
15-
uses: actions/setup-python@v5
16-
with:
17-
python-version: '3.12'
18-
19-
- name: Install uv
14+
- name: Install system dependencies
2015
shell: bash
21-
run: pip install uv
16+
run: |
17+
sudo apt-get update
18+
sudo apt-get install -y zip jq wget
2219
23-
- name: Setup Python Cache
24-
uses: actions/cache@v4
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v7
2522
with:
26-
path: ~/.cache/uv
27-
key: ${{ runner.os }}-uv-${{ hashFiles('**/requirements.txt') }}
28-
restore-keys: |
29-
${{ runner.os }}-uv-
23+
enable-cache: true
24+
python-version-file: ./buildtools/pyproject.toml
3025

3126
- name: Install dependencies
3227
shell: bash
33-
run: uv pip install --system -r ./buildtools/requirements.txt
28+
working-directory: ./buildtools
29+
run: uv sync

.github/workflows/preview.yml

Lines changed: 32 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -8,43 +8,37 @@ on:
88
workflow_dispatch:
99
inputs:
1010
target_branch:
11-
description: 'Target branch for the preview'
11+
description: "Target branch for the preview"
1212
type: string
1313
required: true
1414
version:
15-
description: 'Modpack version'
15+
description: "Modpack version"
1616
required: true
1717
preview_version:
18-
description: 'Preview version'
18+
description: "Preview version"
1919
required: true
2020

2121
env:
2222
NAME: "GTExpert2"
23-
VERSION_NORMAL: "v${{ github.event.inputs.version }}-pr-${{ github.event.inputs.preview_version }}"
24-
VERSION_LWJGL3: "v${{ github.event.inputs.version }}-lwjgl3-${{ github.event.inputs.preview_version }}"
23+
JAVA8_CF: "${{ github.event.inputs.version }}-Pre-${{ github.event.inputs.preview_version }}-CF_Java_8"
24+
JAVA8_MMC: "${{ github.event.inputs.version }}-Pre-${{ github.event.inputs.preview_version }}-MMC_Java_8"
25+
JAVA8_SERVER: "${{ github.event.inputs.version }}-Pre-${{ github.event.inputs.preview_version }}-Server_Java_8"
26+
JAVA_OPT: "${{ github.event.inputs.version }}-Pre-${{ github.event.inputs.preview_version }}-MMC_Java_17-25"
2527

2628
jobs:
2729
build:
28-
runs-on: ubuntu-latest
30+
runs-on: ubuntu-slim
2931
strategy:
3032
matrix:
3133
buildType: [standard, lwjgl3]
3234

3335
steps:
3436
- name: Checkout repository
35-
uses: actions/checkout@v4
37+
uses: actions/checkout@v5
3638
with:
3739
ref: ${{ github.event.inputs.target_branch || github.ref }}
3840
fetch-depth: 0
3941

40-
- name: Cache dependencies
41-
uses: actions/cache@v4
42-
with:
43-
path: |
44-
~/.m2/repository
45-
~/.cache/pip
46-
key: ${{ runner.os }}-deps-${{ matrix.buildType }}-${{ hashFiles('**/pom.xml') }}
47-
4842
- name: Download Resource Packs zip
4943
run: |
5044
GITHUB_RELEASE=$(curl -s https://api.github.com/repos/GTModpackTeam/GTE2-Translations/releases)
@@ -64,21 +58,21 @@ jobs:
6458
VER="${{ env.VERSION_LWJGL3 }}"
6559
echo "[CleanroomMMC] GregTech Expert 2 $VER" > overrides/config/txloader/load/custommainmenu/version.txt
6660
else
67-
VER="${{ env.VERSION_NORMAL }}"
61+
VER="${{ env.JAVA8_CF }}"
6862
echo "GregTech Expert 2 $VER" > overrides/config/txloader/load/custommainmenu/version.txt
6963
fi
7064
sed -i "s/MODPACKVERSION/$VER/g" manifest.json instance.cfg overrides/config/craftpresence.json
7165
7266
- name: Adjust for LWJGL3
7367
if: matrix.buildType == 'lwjgl3'
7468
run: |
75-
python buildtools/gen-lwjgl3-manifest.py
69+
uv run --directory ./buildtools python ./gen-lwjgl3-manifest.py
7670
cp -vf cmmc/manifest.json manifest.json
7771
7872
- name: Install Mods
7973
env:
8074
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
81-
run: python buildtools/mod-install.py
75+
run: uv run --directory ./buildtools python ./mod-install.py
8276

8377
- name: Clean up placeholder files
8478
run: find . -name ".gitkeep" -delete
@@ -87,21 +81,18 @@ jobs:
8781
run: |
8882
if [[ "${{ matrix.buildType }}" == "lwjgl3" ]]; then
8983
sed -i "s/B:EnableCustomGameTitle=false/B:EnableCustomGameTitle=true/" overrides/config/stellar_core.cfg
90-
cp -rvf cmmc/bansoukou/ ./overrides/
91-
rm -Rf cmmc/bansoukou/
9284
mv -vf overrides/ .minecraft/
9385
cp -vf icon.png .minecraft/
9486
cp -rvf cmmc/* ./
95-
zip -r artifacts/${{ env.NAME }}-${{ env.VERSION_LWJGL3 }}-mmc.zip libraries/ patches/ mmc-pack.json instance.cfg .minecraft/
87+
zip -r artifacts/${{ env.NAME }}-${{ env.JAVA_OPT }}.zip patches/ mmc-pack.json instance.cfg .minecraft/
9688
else
97-
zip -r artifacts/${{ env.NAME }}-${{ env.VERSION_NORMAL }}-cf.zip manifest.json modlist.html overrides/bansoukou/ overrides/config/ overrides/local/ overrides/resourcepacks/icons/ overrides/resourcepacks/GTExpert2-* overrides/scripts/
89+
zip -r artifacts/${{ env.NAME }}-${{ env.JAVA8_CF }}.zip manifest.json modlist.html overrides/config/ overrides/local/ overrides/resourcepacks/icons/ overrides/resourcepacks/GTExpert2-* overrides/scripts/
9890
mv overrides/ .minecraft/
9991
cp icon.png .minecraft/
100-
zip -r artifacts/${{ env.NAME }}-${{ env.VERSION_NORMAL }}-mmc.zip mmc-pack.json instance.cfg .minecraft/
92+
zip -r artifacts/${{ env.NAME }}-${{ env.JAVA8_MMC }}.zip mmc-pack.json instance.cfg .minecraft/
10193
mv serverfiles/* ./
10294
rm -vf .minecraft/mods/!Red-Core-*
10395
rm -vf .minecraft/mods/Alfheim-*
104-
rm -vf .minecraft/mods/Valkyrie-*
10596
rm -vf .minecraft/mods/CraftPresence-*
10697
rm -vf .minecraft/mods/Controlling-*
10798
rm -vf .minecraft/mods/UniLib-*
@@ -116,33 +107,32 @@ jobs:
116107
rm -vf .minecraft/mods/InGameInfoXML-*
117108
rm -vf .minecraft/mods/oauth-*
118109
rm -vf .minecraft/mods/UntranslatedItems-*
119-
rm -vf .minecraft/mods/vintagefix-*
120110
mv -vf .minecraft/* ./
121-
zip -r artifacts/${{ env.NAME }}-${{ env.VERSION_NORMAL }}-server.zip docker-compose.yml PleaseRead.txt log4j2_112-116.xml Install.* ServerStart.* settings.* TmuxServer.sh bansoukou/ config/ local/ mods/ resources/ scripts/
111+
zip -r artifacts/${{ env.NAME }}-${{ env.JAVA8_SERVER }}.zip docker-compose.yml PleaseRead.txt log4j2_112-116.xml Install.* ServerStart.* settings.* TmuxServer.sh config/ local/ mods/ resources/ scripts/
122112
fi
123113
124114
- name: Upload Artifacts
125-
uses: actions/upload-artifact@v4
115+
uses: actions/upload-artifact@v5
126116
with:
127117
name: ${{ matrix.buildType }}-artifacts
128118
path: artifacts/
129119
retention-days: 1
130120

131121
release:
132122
needs: build
133-
runs-on: ubuntu-latest
123+
runs-on: ubuntu-slim
134124
permissions:
135125
contents: write
136126

137127
steps:
138128
- name: Checkout repository
139-
uses: actions/checkout@v4
129+
uses: actions/checkout@v5
140130
with:
141131
ref: ${{ github.event.inputs.target_branch || github.ref }}
142132
fetch-depth: 0
143133

144134
- name: Download All Artifacts
145-
uses: actions/download-artifact@v4
135+
uses: actions/download-artifact@v6
146136
with:
147137
path: downloads
148138

@@ -160,28 +150,28 @@ jobs:
160150
run: |
161151
git config --global user.name "github-actions"
162152
git config --global user.email "[email protected]"
163-
git tag ${{ env.VERSION_NORMAL }}
164-
git push origin ${{ env.VERSION_NORMAL }}
153+
git tag ${{ env.JAVA8_CF }}
154+
git push origin ${{ env.JAVA8_CF }}
165155
166156
- name: Create or Update GitHub Release
167157
uses: softprops/action-gh-release@v2
168158
with:
169-
tag_name: ${{ env.VERSION_NORMAL }}
170-
name: "Preview ${{ env.VERSION_NORMAL }}"
159+
tag_name: "v${{ github.event.inputs.version }}-pr-${{ github.event.inputs.preview_version }}"
160+
name: "v${{ github.event.inputs.version }}-Pre-${{ github.event.inputs.preview_version }}"
171161
body: |
172-
## GregTech Expert 2 - Preview Release
162+
## GregTech Expert 2 Preview - ${{ github.event.inputs.version }}
173163
174164
This preview includes:
175-
- **Standard** (CurseForge / MultiMC / PrismLauncher / Server)
176-
- **LWJGL3** (MultiMC / PrismLauncher only)
165+
- **Java 8** (CurseForge / MultiMC / PrismLauncher / Server)
166+
- **Java 17-25** (MultiMC / PrismLauncher only)
177167
178-
See installation guide for LWJGL3 [here](https://github.com/GTModpackTeam/GregTech-Expert-2/blob/main/cmmc/README.md).
168+
See installation guide for Java 17-25 [here](https://github.com/GTModpackTeam/GregTech-Expert-2/blob/main/cmmc/).
179169
prerelease: true
180170
generate_release_notes: true
181171
files: |
182-
artifacts/${{ env.NAME }}-${{ env.VERSION_NORMAL }}-cf.zip
183-
artifacts/${{ env.NAME }}-${{ env.VERSION_NORMAL }}-mmc.zip
184-
artifacts/${{ env.NAME }}-${{ env.VERSION_NORMAL }}-server.zip
185-
artifacts/${{ env.NAME }}-${{ env.VERSION_LWJGL3 }}-mmc.zip
172+
artifacts/${{ env.NAME }}-${{ env.JAVA8_CF }}.zip
173+
artifacts/${{ env.NAME }}-${{ env.JAVA8_MMC }}.zip
174+
artifacts/${{ env.NAME }}-${{ env.JAVA8_SERVER }}.zip
175+
artifacts/${{ env.NAME }}-${{ env.JAVA_OPT }}.zip
186176
env:
187177
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)