Skip to content

Commit 55b0dd1

Browse files
committed
Fix CICD
1 parent a3583c9 commit 55b0dd1

File tree

2 files changed

+28
-26
lines changed

2 files changed

+28
-26
lines changed

.github/workflows/preview.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ on:
2020

2121
env:
2222
NAME: "GTExpert2"
23-
VERSION_NORMAL: "v${{ github.event.inputs.version }}-Pre-${{ github.event.inputs.preview_version }}_Java_8"
24-
VERSION_LWJGL3: "v${{ github.event.inputs.version }}-Pre-${{ github.event.inputs.preview_version }}_Java_17-25"
23+
VERSION_CF_NORMAL: "v${{ github.event.inputs.version }}-Pre-${{ github.event.inputs.preview_version }}-CF_Java_8"
24+
VERSION_MMC_NORMAL: "v${{ github.event.inputs.version }}-Pre-${{ github.event.inputs.preview_version }}-MMC_Java_8"
25+
VERSION_MMC_LWJGL3: "v${{ github.event.inputs.version }}-Pre-${{ github.event.inputs.preview_version }}-MMC_Java_17-25"
2526

2627
jobs:
2728
build:
@@ -82,12 +83,12 @@ jobs:
8283
mv -vf overrides/ .minecraft/
8384
cp -vf icon.png .minecraft/
8485
cp -rvf cmmc/* ./
85-
zip -r artifacts/${{ env.NAME }}-${{ env.VERSION_LWJGL3 }}_Java_17-25.zip patches/ mmc-pack.json instance.cfg .minecraft/
86+
zip -r artifacts/${{ env.VERSION_MMC_LWJGL3 }}.zip patches/ mmc-pack.json instance.cfg .minecraft/
8687
else
87-
zip -r artifacts/${{ env.NAME }}-${{ env.VERSION_NORMAL }}_Java_8.zip manifest.json modlist.html overrides/config/ overrides/local/ overrides/resourcepacks/icons/ overrides/resourcepacks/GTExpert2-* overrides/scripts/
88+
zip -r artifacts/${{ env.VERSION_CF_NORMAL }}.zip manifest.json modlist.html overrides/config/ overrides/local/ overrides/resourcepacks/icons/ overrides/resourcepacks/GTExpert2-* overrides/scripts/
8889
mv overrides/ .minecraft/
8990
cp icon.png .minecraft/
90-
zip -r artifacts/${{ env.NAME }}-${{ env.VERSION_NORMAL }}_Java_17-25.zip mmc-pack.json instance.cfg .minecraft/
91+
zip -r artifacts/${{ env.VERSION_MMC_NORMAL }}.zip mmc-pack.json instance.cfg .minecraft/
9192
mv serverfiles/* ./
9293
rm -vf .minecraft/mods/!Red-Core-*
9394
rm -vf .minecraft/mods/Alfheim-*
@@ -106,7 +107,7 @@ jobs:
106107
rm -vf .minecraft/mods/oauth-*
107108
rm -vf .minecraft/mods/UntranslatedItems-*
108109
mv -vf .minecraft/* ./
109-
zip -r artifacts/${{ env.NAME }}-${{ env.VERSION_NORMAL }}-server.zip docker-compose.yml PleaseRead.txt log4j2_112-116.xml Install.* ServerStart.* settings.* TmuxServer.sh config/ local/ mods/ resources/ scripts/
110+
zip -r artifacts/${{ env.NAME }}-Pre-${{ env.VERSION_NORMAL }}-server.zip docker-compose.yml PleaseRead.txt log4j2_112-116.xml Install.* ServerStart.* settings.* TmuxServer.sh config/ local/ mods/ resources/ scripts/
110111
fi
111112
112113
- name: Upload Artifacts
@@ -154,22 +155,22 @@ jobs:
154155
- name: Create or Update GitHub Release
155156
uses: softprops/action-gh-release@v2
156157
with:
157-
tag_name: ${{ env.VERSION_NORMAL }}
158-
name: "Preview ${{ env.VERSION_NORMAL }}"
158+
tag_name: "v${{ github.event.inputs.version }}-pr-${{ github.event.inputs.preview_version }}"
159+
name: "v${{ github.event.inputs.version }}-Pre-${{ github.event.inputs.preview_version }}"
159160
body: |
160-
## GregTech Expert 2 - Preview Release
161+
## GregTech Expert 2 Preview - {{ github.event.inputs.version }}
161162
162163
This preview includes:
163164
- **Java 8** (CurseForge / MultiMC / PrismLauncher / Server)
164165
- **Java 17-25** (MultiMC / PrismLauncher only)
165166
166-
See installation guide for LWJGL3 [here](https://github.com/GTModpackTeam/GregTech-Expert-2/blob/main/cmmc/README.md).
167+
See installation guide for Java 17-25 [here](https://github.com/GTModpackTeam/GregTech-Expert-2/blob/main/cmmc/).
167168
prerelease: true
168169
generate_release_notes: true
169170
files: |
170-
artifacts/${{ env.NAME }}-${{ env.VERSION_NORMAL }}_Java_8.zip
171-
artifacts/${{ env.NAME }}-${{ env.VERSION_NORMAL }}_Java_17-25.zip
172-
artifacts/${{ env.NAME }}-${{ env.VERSION_NORMAL }}-server.zip
173-
artifacts/${{ env.NAME }}-${{ env.VERSION_LWJGL3 }}_Java_17-25.zip
171+
artifacts/${{ env.VERSION_CF_NORMAL }}.zip
172+
artifacts/${{ env.VERSION_MMC_NORMAL }}.zip
173+
artifacts/${{ env.NAME }}-Pre-${{ env.VERSION_NORMAL }}-server.zip
174+
artifacts/${{ env.VERSION_MMC_LWJGL3 }}.zip
174175
env:
175176
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ on:
1818

1919
env:
2020
NAME: "GTExpert2"
21-
VERSION_NORMAL: "v${{ github.event.inputs.version }}-${{ github.event.inputs.preview_version }}_Java_8"
22-
VERSION_LWJGL3: "v${{ github.event.inputs.version }}-${{ github.event.inputs.preview_version }}_Java_17-25"
21+
VERSION_CF_NORMAL: "v${{ github.event.inputs.version }}-CF_Java_8"
22+
VERSION_MMC_NORMAL: "v${{ github.event.inputs.version }}-MMC_Java_8"
23+
VERSION_MMC_LWJGL3: "v${{ github.event.inputs.version }}-MMC_Java_17-25"
2324

2425
jobs:
2526
build:
@@ -79,12 +80,12 @@ jobs:
7980
mv -vf overrides/ .minecraft/
8081
cp -vf icon.png .minecraft/
8182
cp -rvf cmmc/* ./
82-
zip -r artifacts/${{ env.NAME }}-${{ env.VERSION_LWJGL3 }}_Java_17-25.zip patches/ mmc-pack.json instance.cfg .minecraft/
83+
zip -r artifacts/${{ env.VERSION_MMC_LWJGL3 }}.zip patches/ mmc-pack.json instance.cfg .minecraft/
8384
else
84-
zip -r artifacts/${{ env.NAME }}-${{ env.VERSION_NORMAL }}_Java_8.zip manifest.json modlist.html overrides/config/ overrides/local/ overrides/resourcepacks/ overrides/scripts/
85+
zip -r artifacts/${{ env.VERSION_CF_NORMAL }}.zip manifest.json modlist.html overrides/config/ overrides/local/ overrides/resourcepacks/ overrides/scripts/
8586
mv overrides/ .minecraft/
8687
cp icon.png .minecraft/
87-
zip -r artifacts/${{ env.NAME }}-${{ env.VERSION_NORMAL }}_Java_17-25.zip mmc-pack.json instance.cfg .minecraft/
88+
zip -r artifacts/${{ env.VERSION_MMC_NORMAL }}.zip mmc-pack.json instance.cfg .minecraft/
8889
mv serverfiles/* ./
8990
rm -vf .minecraft/mods/!Red-Core-*
9091
rm -vf .minecraft/mods/Alfheim-*
@@ -153,22 +154,22 @@ jobs:
153154
- name: Create or update GitHub Release
154155
uses: softprops/action-gh-release@v2
155156
with:
156-
tag_name: ${{ env.VERSION_NORMAL }}
157-
name: "Modpack ${{ env.VERSION_NORMAL }}"
157+
tag_name: "v${{ github.event.inputs.version }}-${{ github.event.inputs.release_type }}"
158+
name: "v${{ github.event.inputs.version }}-${{ github.event.inputs.release_type }}"
158159
body: |
159-
## GregTech Expert 2 - ${{ env.VERSION_NORMAL }}
160+
## GregTech Expert 2 - {{ github.event.inputs.version }}
160161
161162
This preview includes:
162163
- **Java 8** (CurseForge / MultiMC / PrismLauncher / Server)
163164
- **Java 17-25** (MultiMC / PrismLauncher only)
164165
165-
See installation guide for LWJGL3 [here](https://github.com/GTModpackTeam/GregTech-Expert-2/blob/main/cmmc/README.md).
166+
See installation guide for Java 17-25 [here](https://github.com/GTModpackTeam/GregTech-Expert-2/blob/main/cmmc/).
166167
prerelease: false
167168
generate_release_notes: true
168169
files: |
169-
artifacts/${{ env.NAME }}-${{ env.VERSION_NORMAL }}_Java_8.zip
170-
artifacts/${{ env.NAME }}-${{ env.VERSION_NORMAL }}_Java_17-25.zip
170+
artifacts/${{ env.VERSION_CF_NORMAL }}.zip
171+
artifacts/${{ env.VERSION_MMC_NORMAL }}.zip
171172
artifacts/${{ env.NAME }}-${{ env.VERSION_NORMAL }}-server.zip
172-
artifacts/${{ env.NAME }}-${{ env.VERSION_LWJGL3 }}_Java_17-25.zip
173+
artifacts/${{ env.VERSION_MMC_LWJGL3 }}.zip
173174
env:
174175
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)