Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Xikaro committed Oct 26, 2024
1 parent 071d150 commit ac3138f
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 15 deletions.
63 changes: 48 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ env:

on:
push:
branches:
- pakku
# tags:
# - "*.*.*"

Expand Down Expand Up @@ -110,15 +112,14 @@ jobs:
- name: Checkout
uses: actions/[email protected]

- name: Set GroovyScript debug mode to 'false'
- name: Replace strings
shell: bash
run: |
set +e
grooovy="./groovy/runConfig.json"
cat <<< $(jq '.debug = false' $grooovy) > $grooovy
sed -i -e "s/DEV/${{ needs.info.outputs.project_version }}/g" pakku.json
mv -vf ./.pakku/server-overrides/* ./
- name: Cache pakku
uses: actions/[email protected]
Expand All @@ -130,7 +131,7 @@ jobs:
- name: Export modpack
run: |
java -jar ./pakku.jar --debug export
java -jar ./pakku.jar export
- name: Rename artifact curseforge
run: |
Expand All @@ -144,6 +145,48 @@ jobs:
path: ./build/curseforge/${{ needs.info.outputs.project_name }}-${{ needs.info.outputs.project_version }}-curseforge.zip
if-no-files-found: error

- name: Rename artifact modrinth
run: |
cd ./build/modrinth/
mv *.mrpack $(basename -s .mrpack *.mrpack)-modrinth.mrpack
- name: Upload artifact modrinth
uses: actions/[email protected]
with:
name: ${{ needs.info.outputs.project_name }}-${{ needs.info.outputs.project_version }}-modrinth
path: ./build/modrinth/${{ needs.info.outputs.project_name }}-${{ needs.info.outputs.project_version }}-modrinth.mrpack
if-no-files-found: warn

build-server:
name: Build Server Pack
runs-on: ubuntu-latest
needs: [info]
steps:
- name: Checkout
uses: actions/[email protected]

- name: Replace strings
shell: bash
run: |
set +e
grooovy="./groovy/runConfig.json"
cat <<< $(jq '.debug = false' $grooovy) > $grooovy
sed -i -e "s/DEV/${{ needs.info.outputs.project_version }}/g" pakku.json
- name: Cache pakku
uses: actions/[email protected]
with:
path: build/.cache
key: ${{ runner.OS }}-pakku-cache-${{ hashFiles('build/.cache/') }}
restore-keys: |
${{ runner.OS }}-pakku-cache-
- name: Export modpack
run: |
mv -vf ./.pakku/server-overrides/* ./
java -jar ./pakku.jar export
- name: Rename artifact server
run: |
cd ./build/serverpack/
Expand All @@ -156,17 +199,6 @@ jobs:
path: ./build/serverpack/${{ needs.info.outputs.project_name }}-${{ needs.info.outputs.project_version }}-serverpack.zip
if-no-files-found: error

- name: Rename artifact modrinth
run: |
cd ./build/modrinth/
mv *.mrpack $(basename -s .mrpack *.mrpack)-modrinth.mrpack
- name: Upload artifact modrinth
uses: actions/[email protected]
with:
name: ${{ needs.info.outputs.project_name }}-${{ needs.info.outputs.project_version }}-modrinth
path: ./build/modrinth/${{ needs.info.outputs.project_name }}-${{ needs.info.outputs.project_version }}-modrinth.mrpack
if-no-files-found: error

build-multimc:
name: Build MultiMC Pack
Expand All @@ -176,7 +208,7 @@ jobs:
- name: Checkout
uses: actions/[email protected]

- name: Set GroovyScript debug mode to 'false'
- name: Replace strings
shell: bash
run: |
set +e
Expand All @@ -201,6 +233,7 @@ jobs:
run: |
mkdir -p .pakku/multimc-overrides/flame
mv -vf ./build/.cache/curseforge/* .pakku/multimc-overrides/
mv -vf ./mods* .pakku/multimc-overrides/.minecraft/mods
cd .pakku/multimc-overrides/
mv -vf manifest.json flame/
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
outputs:
cf_release_id: ${{ steps.cf_release.outputs.id }}
steps:

- name: Check if CF_API_TOKEN exist
shell: bash
run: |
Expand Down
5 changes: 5 additions & 0 deletions pakku.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
"client_overrides": [
"resourcepacks"
],
"multimc_overrides": [
"icon.png",
"instance.cfg",
"mmc-pack.json"
],
"projects": {
"ambient-environment": {
"side": "CLIENT"
Expand Down

0 comments on commit ac3138f

Please sign in to comment.