From afa88e16f8c96bc05a3bea93eaf61e3a318ff736 Mon Sep 17 00:00:00 2001 From: Niklas080208 Date: Tue, 3 Feb 2026 19:33:18 +0100 Subject: [PATCH] Updated workflow --- .github/workflows/firmware-autodl.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/firmware-autodl.yml b/.github/workflows/firmware-autodl.yml index c51ca49..2c9f518 100644 --- a/.github/workflows/firmware-autodl.yml +++ b/.github/workflows/firmware-autodl.yml @@ -87,13 +87,17 @@ jobs: - name: 📦 Create firmware zip (exclude .nca.1) if: steps.version_check.outputs.new_version == 'true' run: | - EXCLUDED=$(find "Firmware ${{ steps.download.outputs.firmware_version }}" -name "*.nca.1" | wc -l) - echo "Excluded $EXCLUDED variant files from zip" + VER="${{ steps.download.outputs.firmware_version }}" + DIR="Firmware $VER" + EXCLUDED=$(find "$DIR" -name "*.nca.1" | wc -l) + echo "Excluding $EXCLUDED variant files (.nca.1) from zip" - # -x must match zip's relative path (e.g. "Firmware 18.1.0/file.nca.1"); "*" does not match "/" - zip -r "Firmware ${{ steps.download.outputs.firmware_version }}.zip" \ - "Firmware ${{ steps.download.outputs.firmware_version }}" \ - -x "*/*.nca.1" + # Copy only non-.nca.1 files into a temp dir, then zip (avoids zip -x path matching issues) + rm -rf zip_staging && mkdir -p "zip_staging/$DIR" + find "$DIR" -type f ! -name "*.nca.1" -exec sh -c 'cp "$1" "zip_staging/$1"' _ {} \; + (cd zip_staging && zip -r "../$DIR.zip" "$DIR") + rm -rf zip_staging + echo "Zip created: $DIR.zip" - name: 📦 Create Tag and Release if: steps.version_check.outputs.new_version == 'true'