chore(actions): fix packsquash and build

This commit is contained in:
omo50
2026-03-13 21:36:04 -06:00
parent 1db4a66480
commit 8335d6dd40
11 changed files with 224 additions and 59 deletions

View File

@@ -85,18 +85,33 @@ jobs:
echo "version=$version" >> $GITHUB_OUTPUT
- name: Cache PackSquash
id: cache-packsquash
uses: https://github.com/actions/cache@v3
with:
path: ~/.cargo/bin/packsquash
key: packsquash-${{ runner.os }}
- name: Install PackSquash
if: steps.cache-packsquash.outputs.cache-hit != 'true'
run: |
apt-get update && apt-get install -y cmake
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
$HOME/.cargo/bin/cargo +nightly install --git https://github.com/ComunidadAylas/PackSquash --bin packsquash
- name: Add Cargo to Path
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build
run: |
mkdir -p ${{ env.OUTPUT }}
dir="./resourcepacks/external/${{ env.PACK_FOLDER }}/${{ matrix.subfolder }}"
output="$OLDPWD/${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ matrix.subfolder }}-${{ steps.version.outputs.version }}.zip"
curl -L https://github.com/ComunidadAylas/PackSquash/releases/latest/download/packsquash-linux-x64 -o /tmp/packsquash
chmod +x /tmp/packsquash
dir="./resourcepacks/external/${{ env.PACK_FOLDER }}"
output="$(pwd)/${{ env.OUTPUT }}/${{ env.PACK_FOLDER }}-${{ steps.version.outputs.version }}.zip"
cat > /tmp/options.toml << EOF
pack_directory = '$dir'
output_file_path = '$output'
EOF
/tmp/packsquash /tmp/options.toml
packsquash /tmp/options.toml
- name: Publish to Modrinth
if: needs.check-tag.outputs.is_alpha == 'false'