Updated workflow
This commit is contained in:
16
.github/workflows/firmware-autodl.yml
vendored
16
.github/workflows/firmware-autodl.yml
vendored
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user