Skip to content

Commit 3c82b09

Browse files
committed
Update info.yml
1 parent 57d0200 commit 3c82b09

File tree

1 file changed

+163
-16
lines changed

1 file changed

+163
-16
lines changed

.github/workflows/info.yml

+163-16
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
name: Project Info
22
run-name: "Project Info #${{ github.run_number }}"
3-
4-
env:
5-
RELEASE_TYPE: "release"
6-
73
on:
84
push:
95
branches:
@@ -13,6 +9,9 @@ concurrency:
139
group: ${{ github.workflow }}
1410
cancel-in-progress: true
1511

12+
env:
13+
RELEASE_TYPE: "release"
14+
1615
jobs:
1716
info:
1817
name: 🖥️ Project Info
@@ -28,7 +27,7 @@ jobs:
2827
exists: ${{ steps.check_tag.outputs.exists }}
2928

3029
steps:
31-
- name: 📁 Checkout
30+
- name: Checkout
3231
uses: actions/[email protected]
3332
with:
3433
fetch-depth: 0
@@ -136,6 +135,9 @@ jobs:
136135
with:
137136
file_path: "pakku-lock.json"
138137
prop_path: "mc_versions"
138+
139+
- run: |
140+
echo ${{steps.minecraft_version.outputs.value}}
139141
140142
- name: 📄 Changelog Parser
141143
id: changelog
@@ -168,17 +170,162 @@ jobs:
168170
if [ -n "${{ steps.read_diff.outputs.diff != '' }}" ]; then
169171
echo "${{ steps.read_diff.outputs.diff }}" >> $GITHUB_STEP_SUMMARY
170172
fi
173+
174+
build-modpack:
175+
name: Build Modpack
176+
runs-on: ubuntu-latest
177+
needs: [info]
178+
if: needs.info.outputs.exists != 'true'
179+
180+
steps:
181+
- name: Checkout
182+
uses: actions/[email protected]
183+
184+
- name: Replace strings
185+
shell: bash
186+
run: |
187+
set +e
188+
189+
grooovy="./groovy/runConfig.json"
190+
cat <<< $(jq '.debug = false' $grooovy) > $grooovy
171191
172-
build:
192+
VERSION=${{ needs.info.outputs.project_version }}
193+
sed -i -e "s/DEV/${VERSION}/g" pakku.json
194+
sed -i -e "s/DEV/${VERSION}/g" config/fancymenu/customization/gui_main_menu.txt
195+
196+
# - name: Cache pakku
197+
# uses: actions/[email protected]
198+
# with:
199+
# path: build/.cache
200+
# key: ${{ runner.OS }}-pakku-cache-${{ hashFiles('build/.cache/') }}
201+
# restore-keys: ${{ runner.OS }}-pakku-cache-
202+
203+
- name: Export modpack
204+
run: |
205+
curl https://github.com/juraj-hrivnak/pakku/releases/latest/download/pakku.jar -o pakku.jar -L -J
206+
java -jar pakku.jar export
207+
208+
- name: Rename artifact curseforge
209+
run: |
210+
cd ./build/curseforge/
211+
mv *.zip $(basename -s .zip *.zip)-curseforge.zip
212+
213+
- name: Upload artifact CurseForge
214+
uses: actions/[email protected]
215+
with:
216+
name: ${{ needs.info.outputs.project_full_name }}-curseforge
217+
path: ./build/curseforge/${{ needs.info.outputs.project_full_name }}-curseforge.zip
218+
if-no-files-found: error
219+
220+
- name: Rename artifact modrinth
221+
run: |
222+
cd ./build/modrinth/
223+
mv *.mrpack $(basename -s .mrpack *.mrpack)-modrinth.mrpack
224+
225+
- name: Upload artifact modrinth
226+
uses: actions/[email protected]
227+
with:
228+
name: ${{ needs.info.outputs.project_full_name }}-modrinth
229+
path: ./build/modrinth/${{ needs.info.outputs.project_full_name }}-modrinth.mrpack
230+
if-no-files-found: warn
231+
232+
build-server:
233+
name: Build Server
234+
runs-on: ubuntu-latest
173235
needs: [info]
174236
if: needs.info.outputs.exists != 'true'
175-
uses: ./.github/workflows/build.yml
176-
with:
177-
project_version: ${{ needs.info.outputs.project_version }}
178-
project_name: ${{ needs.info.outputs.project_name }}
179-
project_full_name: ${{ needs.info.outputs.project_full_name }}
180-
changelog: ${{ needs.info.outputs.changelog }}
181-
diff: ${{ needs.info.outputs.diff }}
182-
release_type: ${{ needs.info.outputs.release_type }}
183-
minecraft_version: ${{ needs.info.outputs.minecraft_version }}
184-
secrets: inherit
237+
238+
steps:
239+
- name: Checkout
240+
uses: actions/[email protected]
241+
242+
- name: Replace strings
243+
shell: bash
244+
run: |
245+
set +e
246+
247+
grooovy="./groovy/runConfig.json"
248+
cat <<< $(jq '.debug = false' $grooovy) > $grooovy
249+
250+
VERSION=${{ needs.info.outputs.project_version }}
251+
sed -i -e "s/DEV/${VERSION}/g" pakku.json
252+
sed -i -e "s/DEV/${VERSION}/g" config/fancymenu/customization/gui_main_menu.txt
253+
254+
# - name: Cache pakku
255+
# uses: actions/[email protected]
256+
# with:
257+
# path: build/.cache
258+
# key: ${{ runner.OS }}-pakku-cache-${{ hashFiles('build/.cache/') }}
259+
# restore-keys: ${{ runner.OS }}-pakku-cache-
260+
261+
- name: Export modpack
262+
run: |
263+
mv -vf ./.pakku/server-overrides/* ./
264+
curl https://github.com/juraj-hrivnak/pakku/releases/latest/download/pakku.jar -o pakku.jar -L -J
265+
java -jar pakku.jar export
266+
267+
- name: Rename artifact server
268+
run: |
269+
cd ./build/serverpack/
270+
mv *.zip $(basename -s .zip *.zip)-serverpack.zip
271+
272+
- name: Upload artifact server
273+
uses: actions/[email protected]
274+
with:
275+
name: ${{ needs.info.outputs.project_full_name }}-serverpack
276+
path: ./build/serverpack/${{ needs.info.outputs.project_full_name }}-serverpack.zip
277+
if-no-files-found: error
278+
279+
build-multimc:
280+
name: Build MultiMC
281+
runs-on: ubuntu-latest
282+
needs: [info]
283+
if: needs.info.outputs.exists != 'true'
284+
285+
steps:
286+
- name: Checkout
287+
uses: actions/[email protected]
288+
289+
- name: Replace strings
290+
shell: bash
291+
run: |
292+
set +e
293+
294+
grooovy="./groovy/runConfig.json"
295+
cat <<< $(jq '.debug = false' $grooovy) > $grooovy
296+
297+
VERSION=${{ needs.info.outputs.project_version }}
298+
sed -i -e "s/DEV/${VERSION}/g" pakku.json
299+
sed -i -e "s/DEV/${VERSION}/g" config/fancymenu/customization/gui_main_menu.txt
300+
sed -i -e "s/DEV/${VERSION}/g" .pakku/multimc-overrides/instance.cfg
301+
302+
# - name: Cache pakku
303+
# uses: actions/[email protected]
304+
# with:
305+
# path: build/.cache
306+
# key: ${{ runner.OS }}-pakku-cache-${{ hashFiles('build/.cache/') }}
307+
# restore-keys: ${{ runner.OS }}-pakku-cache-
308+
309+
- name: Export
310+
run: |
311+
curl https://github.com/juraj-hrivnak/pakku/releases/latest/download/pakku.jar -o pakku.jar -L -J
312+
java -jar pakku.jar --debug fetch
313+
java -jar pakku.jar --debug export
314+
315+
- name: Move files
316+
run: |
317+
ls
318+
mkdir -p .pakku/multimc-overrides/flame
319+
mv -vf ./build/.cache/curseforge/manifest.json .pakku/multimc-overrides/flame/manifest.json
320+
mv -vf ./build/.cache/curseforge/overrides .pakku/multimc-overrides/.minecraft
321+
mv -vf ./mods .pakku/multimc-overrides/.minecraft/mods
322+
cd .pakku/multimc-overrides/
323+
324+
zip -r ${{ needs.info.outputs.project_full_name }}-multimc.zip icon.png mmc-pack.json instance.cfg .minecraft/ flame/
325+
326+
- name: Upload zip multimc
327+
uses: actions/[email protected]
328+
with:
329+
name: ${{ needs.info.outputs.project_full_name }}-multimc
330+
path: .pakku/multimc-overrides/${{ needs.info.outputs.project_full_name }}-multimc.zip
331+
if-no-files-found: error

0 commit comments

Comments
 (0)