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)
|
- name: 📦 Create firmware zip (exclude .nca.1)
|
||||||
if: steps.version_check.outputs.new_version == 'true'
|
if: steps.version_check.outputs.new_version == 'true'
|
||||||
run: |
|
run: |
|
||||||
EXCLUDED=$(find "Firmware ${{ steps.download.outputs.firmware_version }}" -name "*.nca.1" | wc -l)
|
VER="${{ steps.download.outputs.firmware_version }}"
|
||||||
echo "Excluded $EXCLUDED variant files from zip"
|
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 "/"
|
# Copy only non-.nca.1 files into a temp dir, then zip (avoids zip -x path matching issues)
|
||||||
zip -r "Firmware ${{ steps.download.outputs.firmware_version }}.zip" \
|
rm -rf zip_staging && mkdir -p "zip_staging/$DIR"
|
||||||
"Firmware ${{ steps.download.outputs.firmware_version }}" \
|
find "$DIR" -type f ! -name "*.nca.1" -exec sh -c 'cp "$1" "zip_staging/$1"' _ {} \;
|
||||||
-x "*/*.nca.1"
|
(cd zip_staging && zip -r "../$DIR.zip" "$DIR")
|
||||||
|
rm -rf zip_staging
|
||||||
|
echo "Zip created: $DIR.zip"
|
||||||
|
|
||||||
- name: 📦 Create Tag and Release
|
- name: 📦 Create Tag and Release
|
||||||
if: steps.version_check.outputs.new_version == 'true'
|
if: steps.version_check.outputs.new_version == 'true'
|
||||||
|
|||||||
Reference in New Issue
Block a user